反向PHP mysql_fetch_array
我从数据库中获取最后4行,但我想要反向排序这4行
mysql_query("SELECT * FROM `table` ORDER BY `id` DESC LIMIT 4");
我该怎么做?
答案 0 :(得分:4)
mysql_query("SELECT * FROM (SELECT * FROM table ORDER BY id DESC LIMIT 4) t ORDER BY id ASC");
我认为应该这样做