php mysql sort by date (newest)

后端 未结 2 669
南笙
南笙 2020-12-03 11:34

Right now im sorting by each articles auto_increment id with the query below

mysql_query(\"SELECT * FROM articles ORDER BY id DESC\");

I wanna

2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-03 12:12

    Just change the column in the ORDER BY:

    SELECT * FROM articles ORDER BY time DESC
    

提交回复
热议问题