婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁 > 網站建設 > 建站知識 > dedecms模板調用論壇DZ的帶附件為圖片的帖子

dedecms模板調用論壇DZ的帶附件為圖片的帖子

POST TIME:2018-10-30 21:56

調用附件帶圖片的貼子

——————————————————————————————-
{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
主站蜘蛛池模板: 长治县| 大厂| 阳西县| 鄱阳县| 奎屯市| 平湖市| 余姚市| 富宁县| 文山县| 垫江县| 左权县| 石狮市| 涞源县| 屏南县| 济阳县| 江山市| 平定县| 孟津县| 互助| 双流县| 临沧市| 开封市| 大石桥市| 元朗区| 黎川县| 宜川县| 边坝县| 郎溪县| 安泽县| 大丰市| 东光县| 当涂县| 定结县| 云阳县| 新闻| 嘉荫县| 西峡县| 河北省| 青冈县| 安乡县| 修文县|