dedecms模板調用論壇DZ的帶附件為圖片的帖子,織夢
導讀:織夢教程織夢教程調用附件帶圖片的貼子----------------------------------------------------------------------dede模板下載。
調用附件帶圖片的貼子 ——————————————————————————————- {dede:sql sql="SELECT` cdb_attachments`.織夢cms模板`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 distinct dz_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:attachme織夢手機模板nt/]"></A></li> <li><A href="/bbs/viewthread.php?tid=[field:tid /]">[field:subject function="cn_substr('@me',30)" /]</A></li> {/dede:sql}
相關dede模板下載。聲明: 本文由我的SEOUC技術文章主頁發布于:2023-07-22 ,文章dedecms模板調用論壇DZ的帶附件為圖片的帖子,織夢主要講述附件,模板,織夢網站建設源碼以及服務器配置搭建相關技術文章。轉載請保留鏈接: http://www.bifwcx.com/article/web_33615.html