SQL通用分页
这是文章系统的:
查询语句select id,title,keywords,hits,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 verific=1 order by id desc
循 环 体<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:58px;">
<div style="padding-top:10px;text-align:center;background:url(/images ote_bg_t.png) #FFF no-repeat;height:60px;">
<span id="s{$Field(id,GetInfoUrl,1,2)}" style="font-weight:bold;"></span><br /><span>人支持</span> </div>
<div style="padding-top:2px;height:25px;text-align:center;background: url(/images ote_bg_b.png) no-repeat center 0;" 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>{$Field(intro,Text,250,...,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]
想改在商城里调用 知道的加我QQ 1908648 不胜感激