我在子栏目调用SQL标签,SQL标签部分内容是:
查询语句:select id,title,keywords,hits,tid,intro,adddate,author,(select count(id) from ks_comment where channelid=1 and infoid=ks_article.id) as commenttotal from KS_Article where tid in({$CurrClassChildID}) and deltf=0 and verific=1 order by id desc
循 环 体{$AutoID}:
<script src="/ks_inc/digg.js" language="javascript"></script>
[loop=10]
<table width="100%" border="0">
<tr>
<td width="80" rowspan="4">
<div style="width:61px;text-align:center;background:url(/images/diggbg.gif) #FFF no-repeat;height:68px;">
<div style="padding-top:8px;">
<span id="s{$Field(id,GetInfoUrl,1,2)}" style="font-weight:bold;"></span><br /><span>人支持</span> </div>
<div style="padding-top:8px;" id="d{$Field(id,GetInfoUrl,1,2)}"><a href="javascript:digg(1,{$Field(id,GetInfoUrl,1,2)},'/');">顶一下</a></div>
</div>
<script language="javascript">show_digg(1,{$Field(id,GetInfoUrl,1,2)},'/');</script>
</td>
<td><a href="{$Field(id,GetInfoUrl,1,1)}" target="_blank"><font style="color:#ff6600;font-size:14px;">{$Field(title,Text,0,...,0,)}</font></a></td>
</tr>
<tr>
<td width="650">{$Field(intro,Text,50,...,2,)}</td>
</tr>
<tr>
<td>TAGS:{$Field(keywords,Text,0,...,0,)}</td>
</tr>
<tr>
<td><a href="/plus/comment.asp?channelid=1&infoid={$Field(id,GetInfoUrl,1,2)}" target="_blank">评论:<font color=red>{$Field(commenttotal,Num,0,2)}</font>条</a> 阅读:<font color=red>{$Field(hits,Num,0,2)}</font>人次 <font color=#999999>更新时间:{$Field(adddate,Date,YYYY-MM-DD hh:mm:ss)} 作者:{$Field(author,Text,0,...,2,佚名)}</font> </td>
</tr>
</table>
<div style="border-bottom:1px dashed #999999;"></div>
[/loop]