how to invoke the neweset one week recored in mysql?
how to wri开发者_运维技巧te the code in php that invoke the neweset one week articles' title in mysql? eg: the table name is "threads". the time field is "dateline" whose style is like this (1300774889), the article title is "subject". thank you.i want to invoke 10 records.
Something like :
Select * from THREADS where dateline > date_sub(now(), interval 1 week) order by dateline desc;
you can format your date in PHP with date() function, or directly in mysql using FROM_UNIXTIME
精彩评论