作者:有故事的人 文章来源:东坡网
本文原地址:http://www.dp1037.com/dpinfo-6-54-0.html
东坡网,为帝国cms加油
代码一:多个sinfo分开调用其子信息
<?php $ctsql=$empire->query("select * from {$dbtbpre}dptag_sinfo where classid='$navinfor[classid]' and id='$navinfor[id]' limit 99"); while($ctr=$empire->fetch($ctsql)){ ?> [e:indexloop={"select * from {$dbtbpre}dptag_sinfo where ztid='$ctr[ztid]' limit 10",0,11,'',''}] <a href="<?=$bqsr['titleurl']?>" target="_blank"><?=$bqr['title']?></a> <br> [/e:indexloop] <? } ?>
代码二:多个子sinfo,混合调用其子信息
[e:indexloop={"select * from {$dbtbpre}dptag_sinfo where ztid in (select ztid from {$dbtbpre}dptag_sinfo where classid='$navinfor[classid]' and id='$navinfor[id]') limit 10",0,11,'',''}] <a href="<?=$bqsr['titleurl']?>" target="_blank"><?=$bqr['title']?></a> <br> [/e:indexloop]
$thisztid=Sinfo的id; $sznum=$empire->gettotal("select count(*) as total from {$dbtbpre}dptag_sinfo where ztid='$thisztid'");
不同页面,$thisztid值是不同的,根据具体情况来写。
更多 帝国cms插件帮助 请访问 http://www.dp1037.com/dpclass-6-0/
文章生成doc功能,由东坡网开发