虚位以待(AD)
虚位以待(AD)
首页 > CMS教程 > 其它cms > 科汛CMS的sql标签使用技巧

科汛CMS的sql标签使用技巧
类别:其它cms   作者:码皇   来源:互联网   点击:

关键字描述:使用技巧 标签   Field < 求职 where from 科技 1、sql标签实现栏目后带栏目下文章数:  示例效果: 科技(100) 求职(2000)
关键字描述:使用技巧 标签   Field < 求职 where from 科技

1、sql标签实现栏目后带栏目下文章数:

 示例效果:

科技(100) 求职(2000) 教育(10) 科技(100) 求职(2000) 教育(10)

实现要点:

SQL语句
SELECT top 10 id, foldername,(select count(*) from ks_article where tid=ks_class.id and verific=1) as sum from ks_class where channelid=1

循环体
[loop=10]
<a href='{$Field(id,GetInfoUrl,100,1)}'>
{$Field(foldername,Text,0,...,0,)}({$Field(ssum,Num,0,2)}篇)
</a>
[/loop]

2、专题专题名称后带文章(数量)

示例效果:

科技(100) 求职(2000) 教育(10) 科技(100) 求职(2000) 教育(10)

实现要点:
语句
SELECT top 10 specialid, specialname,(select count(*) from ks_article where instr(SpecialID,ks_special.specialid)>0) as ssum from ks_special where channelid=1

循环体
[loop=10]
<a href="/article/special.asp?id={$Field(specialid,Num,0,2)}">
{$Field(specialname,Text,0,...,0,)}({$Field(ssum,Num,0,2)})</a><br>
[/loop]


相关热词搜索: 使用技巧 标签 Field &lt where 求职 科技