网站之家技术交流论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 1574|回复: 0

sql如何一起调用dzx2帖子标题+图片+简介!

[复制链接]
发表于 2012-11-1 01:31:33 | 显示全部楼层 |阅读模式
  1. [e:loop={"select u.attachment as titlepic,ui.subject as title,u.tid as id,ui.author as ftitle,c.message as smalltext from (select * from dfmh_empirecms.localpre_forum_attachment_0 union all select * from dfmh_empirecms.localpre_forum_attachment_1 union all select * from dfmh_empirecms.localpre_forum_attachment_2 union all select * from dfmh_empirecms.localpre_forum_attachment_3 union all select * from dfmh_empirecms.localpre_forum_attachment_4 union all select * from dfmh_empirecms.localpre_forum_attachment_5 union all select * from dfmh_empirecms.localpre_forum_attachment_6 union all select * from dfmh_empirecms.localpre_forum_attachment_7 union all select * from dfmh_empirecms.localpre_forum_attachment_8 union all select * from dfmh_empirecms.localpre_forum_attachment_9 ) u LEFT JOIN dfmh_empirecms.localpre_forum_thread ui ON u.tid=ui.tid LEFT JOIN dfmh_empirecms.localpre_forum_post c on c.tid=ui.tid where ui.fid=38 order by ui.tid DESC limit 1",0,24,0,0,0}]
  2.      <a title="<?=$bqr[title]?>" href="/local/forum.php?mod=viewthread&tid=<?=$bqr[id]?>" target="_blank"><img alt="<?=$bqr[title]?>" src="/local/data/attachment/forum/<?=$bqr[titlepic]?>" width="80" height="60" /></a>
  3.           <div class="tre18"><h3><a href="/local/forum.php?mod=viewthread&tid=<?=$bqr[id]?>" title="<?=$bqr[title]?>" target="_blank"><?=sub($bqr[title],0,26,false)?></a> </h3>         <p>
  4.         <?=sub($bqr[smalltext],0,40,false)?> <a title="<?=$bqr[title]?>" href="/local/forum.php?mod=viewthread&tid=<?=$bqr[id]?>" target="_blank" class="l08">[详细]</a>  </p>   </div> [/e:loop]
复制代码
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|网站之家技术交流论坛 ( 粤ICP备09092995号 )

GMT+8, 2024-12-22 22:36 , Processed in 0.085304 second(s), 8 queries , File On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表