1. No Profile Picture
    Devshed Newbie (0 - 499 posts)
    I have a date (LastDate) column in mySQL table. How can I make a search query in PHP to show all the rows where the date is lessthan today (ie: Or 'LastDate' has not expired)

    Thank you


  2. #2
  3. No Profile Picture
    Devshed Newbie (0 - 499 posts)
    IN PHP...


    $selectfiles = "SELECT * FROM [tablenane] WHERE $lastdate < $currentdate;";


    Basicly just compares dates in database with current date. Replace "*" with the fields you want or leave it to get all the fields.

    Luke Bowerman
    new media arts

Similar Threads

  1. mysql date time stamp and UTF8
    By doomish in forum MySQL Help
    Replies: 0
    Last Post: February 8th, 2004, 08:37 AM
  2. Select a mysql result date range with a drop down
    By horstuff in forum PHP Development
    Replies: 0
    Last Post: January 31st, 2004, 02:33 PM
  3. Getting a date from MYSQL using a query
    By Pyros in forum MySQL Help
    Replies: 1
    Last Post: January 10th, 2004, 01:09 PM
  4. asp mysql date inserting
    By eyelinkz in forum MySQL Help
    Replies: 2
    Last Post: January 8th, 2004, 11:17 PM
  5. inserting date to mysql db
    By bulletz in forum ASP Programming
    Replies: 3
    Last Post: December 22nd, 2003, 07:13 PM

IMN logo majestic logo threadwatch logo seochat tools logo