信息页,根据Sinfo调用相关信息
代码一:多个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]
Sinfo子信息数量
$thisztid=Sinfo的id; $sznum=$empire->gettotal("select count(*) as total from {$dbtbpre}dptag_sinfo where ztid='$thisztid'");
不同页面,$thisztid值是不同的,根据具体情况来写。
很赞哦 ()