-3

如何添加 order by 'id' DESC 到此代码?

$querya = mysql_query("select * FROM  {$table_prefix}  where act='1' and status='0' LIMIT  $start_at,$entries_per_page" );
4

3 回答 3

2

尝试这样做。使用id(反引号)

$querya = mysql_query("select * FROM {$table_prefix} where act='1' and status='0' 
order by `id`
LIMIT $start_at,$entries_per_page" );
于 2013-11-01T11:02:09.243 回答
1

它看起来只是一个真正的问题......我认为答案就是这个。

$querya = mysql_query("select * FROM {$table_prefix} where act='1' and status='0' ORDER BY 'id' DESC LIMIT $start_at,$entries_per_page" );
于 2013-11-01T10:59:21.900 回答
0

尝试这个

$querya = mysql_query("select * FROM {$table_prefix} where act='1' and status='0' ORDER BY 'id' DESC LIMIT $start_at,$entries_per_page" );
于 2013-11-01T11:12:23.833 回答