I think it is quite simple, but can not understand. I am trying to make several pages - one that will contain the results selected from my mysql db table for today, this week, and this month. Dates are entered when a record is created using date('Ymd H:i:s'); . Here is what I still have:
day where date> (date- (60 * 60 * 24))
"SELECT * FROM jokes WHERE date>(date-(60*60*24)) ORDER BY score DESC"
week where date> (date- (60 * 60 * 24 * 7))
"SELECT * FROM jokes WHERE date>(date-(60*60*24*7)) ORDER BY score DESC"
month (30 days), where date> (date- (60 * 60 * 24 * 30))
"SELECT * FROM jokes WHERE date>(date-(60*60*24*30)) ORDER BY score DESC"
Any ideas would be highly appreciated. Thank!
date php mysql select
Andrew Samuelsen Mar 13 '11 at 23:16 2011-03-13 23:16
source share