强大号码库资源任选,方便,快捷,快速开通。
咨询热线:400-1100-266
调用附件带图片的贴子
——————————————————————————————-
{dede:sql sql="SELECT` cdb_attachments`.`aid`, `cdb_attachments`.`attachment`,`cdb_threads`.`tid`, `cdb_threads`.`fid`, `cdb_threads`.`subject` FROM `cdb_attachments` LEFT JOIN `cdb_threads` ON `cdb_threads`.`tid`=`cdb_attachments`.`tid` WHERE `cdb_attachments`.`readperm`=’0′ AND `displayorder`>=’0′ AND `filetype`=’image/pjpeg’ GROUP BY tid LIMIT 0,2"}
<li><A href="/bbs/viewthread.php?tid=[field:tid /]"><IMG src="/bbs/attachments/[field:attachment/]"></A></li>
<li><A href="/bbs/viewthread.php?tid=[field:tid /]">[field:subject function="cn_substr('@me',30)" /]</A></li>
{/dede:sql}
这是我琢磨自己写的 希望对大家 有帮助
{dede:sql sql="select dz_threads.tid,dz_attachments.attachment,dz_threads.subject from dz_threads,dz_attachments where dz_threads.tid= (select distinctdz_threads.tid from dz_threads,dz_attachments where dz_attachments.isimage=1 and dz_attachments.tid=dz_threads.tid and dz_threads.fid=4 order by dz_threads.tid desc limit 0,1) and dz_attachments.tid=dz_threads.tid order by dz_threads.tid desc limit 0,1"}
<li><A href="/bbs/viewthread.php?tid=[field:tid /]"><IMG src="/bbs/attachments/[field:attachment/]"></A></li>
<li><A href="/bbs/viewthread.php?tid=[field:tid /]">[field:subject function="cn_substr('@me',30)" /]</A></li>
{/dede:sql}
时间:9:00-21:00 (节假日不休)
版权所有:巨人网络(扬州)科技有限公司
总部地址:江苏省信息产业基地11号楼四层
《增值电信业务经营许可证》 苏B2-20120278