查询SQL语句里面有一个统计记录和一个查询记录的SQL语句,我们就从这里改造!
比如我不想显示栏目ID为1的栏目内文章,就这样写:
统计记录里写:
select count(*) as total from [!db.pre!]ecms_news where classid <>1
查询记录里写:
select * from [!db.pre!]ecms_news where classid <>1 order by id desc
注意[!db.pre!]ecms_news
这个为你适用的系统模型 你的可能和我不一样!
where classid <>1
的意思就是ID为1的栏目不显示在首页了!
如果想多加栏目 就用and连接 比如:where classid <>1 and classid<>2 and classid<>3