超态信息(Sinfo)调用所属信息主要采用索引灵动标签按照sql调用,下面给三个例子。
1、基础篇:调用Sinfo的信息
1 2 3 | [e:indexloop={"select * from {$dbtbpre}dptag_sinfo where ztid='$navinfor[id]' limit 10",0,11,'',''}] <a href="<?=$bqsr['titleurl']?>" target="_blank"><?=$bqr['title']?></a> <br> [/e:indexloop] |
2、按照模型来调用Sinfo信息
1 2 3 4 5 6 7 8 9 10 11 12 | <? $lmsql=$empire->query("select distinct mid from {$dbtbpre}dptag_sinfo where ztid='$navinfor[id]'"); while($lmr=$empire->fetch($lmsql)){ $lmurl=DPsinfo_LmUrl($navinfor,$lmr[mid]); ?> <h3><a href="<?=$lmurl?>" target="_blank"><?=$emod_r[$lmr[mid]][qmname]?></a></h3> [e:indexloop={"select * from {$dbtbpre}dptag_sinfo where ztid='$navinfor[id]' and mid='$lmr[mid]' limit 99",0,11,'',''}] <a href="<?=$bqsr['titleurl']?>" target="_blank"><?=$bqr['title']?></a> <br> [/e:indexloop] <? } ?> |
3、按照子类调用Sinfo信息
1 2 3 4 5 6 7 8 9 10 11 12 | <? $zlsql=$empire->query("select * from {$dbtbpre}dptag_sinfo_c where ztid='$navinfor[id]' order by myorder"); while($zlr=$empire->fetch($zlsql)){ $zlurl=DPsinfo_ZlUrl($navinfor,$zlr[cid],$zlr,1); ?> <h3><a href="<?=$zlurl?>" target="_blank"><?=$zlr[cname]?></a></h3> [e:indexloop={"select * from {$dbtbpre}dptag_sinfo where ztid='$navinfor[id]' and cid='$zlr[cid]' limit 99",0,11,'',''}] <a href="<?=$bqsr['titleurl']?>" target="_blank"><?=$bqr['title']?></a> <br> [/e:indexloop] <? } ?> |
注意:索引灵动标签中用sql调用时的操作类型是11。
新闻热点
疑难解答