开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜