标签: php sql mysql
为什么这个查询有效?我该怎么写呢?
select * from tbl_content order by year desc where visible = '1' limit 0,30;
答案 0 :(得分:3)
WHERE子句在ORDER BY之前。
重写为:
select * from tbl_content where visible = '1' order by year desc limit 0,30;