超态信息(Sinfo)调用所属信息主要采用索引灵动标签按照sql调用,下面给三个例子。

1、基础篇:调用Sinfo的信息

[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信息

<?
$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信息

<?
$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。

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注