蒙面人生蒙面人生

帝国ecms自定义列表收集的一些SQL语句

按关健词调用

统计记录:select count(*) as total from [!db.pre!]ecms_news where checked=1 and keyboard like '%音乐%'

查询记录: select * from [!db.pre!]ecms_news where checked=1 and keyboard like '%音乐%' order by newstime desc


按字段关健词调用

统计记录:select count(*) as total from [!db.pre!]ecms_news where checked=1 and starname like '%韩国男星%'

查询记录: select * from [!db.pre!]ecms_news where checked=1 and starname like '%韩国男星%' order by newstime desc

按专题ID调用

统计记录:select count(*) as total from [!db.pre!]ecms_news where checked=1 and ztid like '%|专题id|%'

查询记录:select * from [!db.pre!]ecms_news where checked=1 and ztid like '%|专题id|%' order by newstime desc

列表页的栏目别名怎么调用如下

推荐、热门自定义列表,以及头条信息怎么写SQL

热门信息列表
统计记录select count(*) as total from [!db.pre!]ecms_news where checked=1 order by onclick desc
查询记录select * from [!db.pre!]ecms_news where checked=1 order by onclick desc

推荐信息列表
统计记录select count(*) as total from [!db.pre!]ecms_news where checked=1 and isgood=1 order by newstime desc
查询记录select * from [!db.pre!]ecms_news where checked=1 and isgood=1 order by newstime desc

那么调用头条的SQL条件怎么写呢?

已解决,SQL为
统计记录select count(*) as total from [!db.pre!]ecms_news where checked=1 and firsttitle=1 order by newstime desc
查询记录select * from [!db.pre!]ecms_news where checked=1 and firsttitle=1 order by newstime desc

按字段内的词调用
[ecmsinfo]"select * from phome_ecms_news where starname='韩国女星' order by onclick desc limit 10",10,18,0,24,24,0[/ecmsinfo]

组合专题
“附加SQL条件”填写“title like '%魔兽争霸%' and title like '%3C%' ”

本原创文章未经允许不得转载 | 当前页面:蒙面人生 » 帝国ecms自定义列表收集的一些SQL语句

评论