首页 > CMS > 帝国Empire > 正文

帝国仿站教程 多表查询+多表标题链接的调用

2024-08-28 12:20:15
字体:
来源:转载
供稿:网友

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

[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为第二个表

  • " target="_blank"><?=$bqr[title]?>  这个是第一个表的标题链接及标题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]?>   这个是第二个表的标题
  • [/e:loop]



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

    发表评论 共有条评论
    用户名: 密码:
    验证码: 匿名发表