Page 1 of 1

show results during a certain time frame

Posted: Mon Jan 08, 2007 7:51 am
by kevrelland
I want to display some date sensitive information i.e. press releases
i want them to be displayed and not display according to the dates set in fields of the mysql db.
can anybody give me some pointers on where to look on how to do this
cheers
kev

Posted: Mon Jan 08, 2007 8:37 am
by Kieran Huggins
Store the lower (and upper) date limits in the database - I would use timestamps for this. Then select * from your_table where start_date<now AND end_date>now.

Posted: Mon Jan 08, 2007 9:08 am
by kevrelland
cheers for the info
kev