Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by jgmills

  1. jgmills

    reset an auto number

    Great, yes thats right, i remember now, 'Compacting & Repairing' thats does it! Thanks
  2. jgmills

    reset an auto number

    Hey all, I have an auto number and with testing etc it is no longer set at 0. So when i make the thing live/hand it over to client, i would like the auto number to be back at 0.... Any ideas how to reset it? Thanks
  3. jgmills

    everything to do with date?

    yes i have learnt alot from all this! thats why i posted thanks people :D
  4. jgmills

    everything to do with date?

    thanks people thought i had already said i had sorted it in the end the code did work but because i was running two quires in a while the $sql and $result etc were getting mixed up each time :S <?php $qDate2 = functionQuery("SELECT DATE_FORMAT('$offerEndDate', '%W %D %M %Y') FROM...
  5. jgmills

    everything to do with date?

    thats correct! function functionQuery($sql){ // Database connection include ("include/dbConnection.php"); // Query databse with sql that is passed to function $q = mysql_query($sql, $link) or die(mysql_error()); // Reture result return $q; }
  6. jgmills

    everything to do with date?

    Do you ever post anything but the obvious! :p Definde "dont work". MySQL's date_format() function will work with columns of type DATE. I just need to find out how to get offerEndDate (DATE) (YYYY-MM-DD) outputted like Friday 2nd July 2004. When i do this $q =...
  7. jgmills

    everything to do with date?

    ok although i have that one sorted now can you explain why... When i use TIMESTAMP you get YYYYMMDD but when you use DATE it uses YYYY-MM-DD I can get dateAdded in nice format (Friday 2nd July 2004) using: SELECT DATE_FORMAT(dateAdded, '%W %M %Y') FROM offers But when i try that on...
  8. jgmills

    everything to do with date?

    got it $q = functionQuery("SELECT DATE_FORMAT(dateAdded, '%W %M %Y') FROM offers"); $result = mysql_fetch_row($q); $dateAddedFormatted = $result[0]; print "$dateAddedFormatted"; nice one thanks still need to get my head around it a bit more but i am getting...
  9. jgmills

    everything to do with date?

    ok well i am still none the wiser now..... dateAdded is TIMESTAMP(8) which is YYYYMMDD thats fine because i can use that to filter stuff and also use it for eventDate to just show future events and not events in the past etc... but i want to actually display a nice date on the site somthing...
  10. jgmills

    everything to do with date?

    OK one more question. eg: tableEvents right id | eventDate (DATE) | dateAdded (TIMESTAMP) ok TIME STAMP adds YYYYMMDD auto and DATE adds my inputted date formatted like YYYY-MM-DD Now when i read these from the database i get them like $eventDate $dateAdded Now can I format this date...
  11. jgmills

    everything to do with date?

    OK yer I know what i am saying but i am never very good at getting it across to others. What you have said in this post has helped me alot. Thank you for your time. this is what i am working on http://www.jgmwebdesign.co.uk/prototypes/cairnsandhickeywines/news_events_offers.php
  12. jgmills

    everything to do with date?

    thats a great help........ one more question... i will from now on use the TIMESTAMP and also use dates in the format YYYY-MM-DD right, this might sound stupid.... but do i set the field type to DATE in the MySQL database? and if yes when i get the date and print $dateAdded right will it be...
  13. jgmills

    everything to do with date?

    MySQL :S
  14. jgmills

    everything to do with date?

    OK I need to sort this out in my mind once and for all. When i am displaying the date for some reson on my site i use date(M:Y); yer we all know that one. OK now i have never got it right when i use dates with databases so i need to learn. For example. I have an events table in my database...
  15. jgmills

    search by price

    thats a good idea $upper=$lower + 10; i have decided to just go a with this: if ($searchPrice == "0") { $lowerbound = "0.00" ; $upperbound = "500.00" ; } if ($searchPrice == "1") { $lowerbound = "0.00" ; $upperbound = "5.99" ; } $q = functionQuery("SELECT * FROM items WHERE itemCountry =...

Part and Inventory Search

Back
Top