优晟SEO

您现在的位置是:首页 > CMS教程 > 帝国cms > 正文

帝国cms

帝国cms多表查询+多表标题链接的调用

帝国   链接   标题  
佚名 2024-08-25帝国cms
多表查询+多表标题链接的调用[e:loop={ "select a.*,b.gsjc from phome_ecms_news a LEFT JOIN phome_ecms_gssj b on a.gsid=b.id where a.classid in (8) order by a.newstime desc limit 1",5,24,0}]以上A为第一个……

帝国cms多表查询+多表标题链接的调用

多表查询+多表标题链接的调用

[e:loop={ "select a.*,b.gsjc from phome_ecms_news a LEFT JOIN phome_ecms_gssj b on a.gsid=b.id where a.classid in (8) order by a.newstime desc limit 1",5,24,0}]

以上A为第一个表 B为第二个表

<li>

<a href="<?=$bqsr[titleurl]?>" target="_blank"><?=$bqr[title]?></a>这个是第一个表的标题链接及标题

<a href=" <? $r=$empire->fetch1("select titleurl,groupid,classid,newspath,filename,id from phome_ecms_gssj where id='$bqr[gsid]' limit 1");

$titleurl=sys_ReturnBqTitleLink($r);

echo $titleurl;?> ">这个是第二个表的标题链接<?=$bqr[gsjc]?></a> 这个是第二个表的标题

</li>[/e:loop]</ul>

第二个表的标题链接蓝色部分不用修改 ID 对应第一个查询的ID即可