标签:
统计记录:(如:select count(*) as total from phome_ecms_news where classid=1 and checked=1)
1.数据表字段中添加分类
2.系统模型中启用该模型
3.自定义列表以下代码
展示代码如下:
1.调用新闻数据表下 字段xwfl 为江苏新闻的内容
统计记录: select count(*) as total from [!db.pre!]ecms_news where xwfl="江苏新闻"
查询记录: select * from [!db.pre!]ecms_news where xwfl="江苏新闻" order by id desc
2.调用关键词中有“谢寒”二字的文章
select count(*) as total from [!db.pre!]ecms_news where title like ‘%谢寒%‘
select * from [!db.pre!]ecms_news where title like ‘%谢寒%‘ order by id desc
标签:
原文地址:http://www.cnblogs.com/officexie/p/4296608.html