分页显示
select * from article where pid between 1 and 5 order by pdate desc 可以
select * from article where pid=0 between 1 and 5 order by pdate desc 不可以;
为什么加上条件pid=0就会显示between附件有错误;关于分页Top我百度看的不明白。有人能讲解下?
[解决办法]
select * from article where pid=0 and pid between 1 and 5 order by pdate desc 少了红字的部分,但是你这句就算加上去都没数据,因为pid不可能同时等于0,又处于1~5之前。