按关健词调用
统计记录: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
列表页的栏目别名怎么调用如下
=$class_r[$GLOBALS[navclassid]][bname]?>
推荐、热门自定义列表,以及头条信息怎么写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%' ”