校园春色亚洲色图_亚洲视频分类_中文字幕精品一区二区精品_麻豆一区区三区四区产品精品蜜桃

主頁 > 網(wǎng)站建設(shè) > 建站知識 > dedecms模板調(diào)用論壇DZ的帶附件為圖片的帖子

dedecms模板調(diào)用論壇DZ的帶附件為圖片的帖子

POST TIME:2018-10-30 21:56

調(diào)用附件帶圖片的貼子

——————————————————————————————-
{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}



收縮
  • 微信客服
  • 微信二維碼
  • 電話咨詢

  • 400-1100-266
主站蜘蛛池模板: 兰西县| 浮山县| 周宁县| 六安市| 墨玉县| 莫力| 澜沧| 凉城县| 武平县| 固阳县| 新余市| 手游| 嵊泗县| 托克逊县| 团风县| 汉中市| 嘉定区| 集贤县| 邹城市| 泗水县| 上杭县| 三江| 大埔县| 如皋市| 廊坊市| 绥宁县| 原阳县| 祁门县| 宣城市| 东阳市| 渝中区| 江孜县| 青铜峡市| 读书| 兰坪| 石首市| 钦州市| 定襄县| 阿坝| 紫阳县| 蓝田县|