织梦系统首页sql调用disucuz2.5内容

  • A+
所属分类:仿站

注明:如果你安装在不同的数据库,需要在sql中指定数据库,我这边是jtb,与公司的织梦dedecms不是安装在同库中。 

调用图文帖子的方法: 

{dede:sql sql="SELECT jtb.pre_forum_threadimage.tid, jtb.pre_forum_threadimage.attachment, jtb.pre_forum_thread.tid, jtb.pre_forum_thread.fid, jtb.pre_forum_thread.subject FROM jtb.pre_forum_threadimage 

LEFT JOIN jtb.pre_forum_thread ON jtb.pre_forum_thread.tid = jtb.pre_forum_threadimage.tid 

 WHERE displayorder >=0 LIMIT 0 , 2"} 

<li><a href="/bbs/forum.php?mod=viewthread&tid=[field:tid /]"><img src="bbs/data/attachment/forum/[field:attachment/]" width="153px" height="100px" /></a></li> 

<li><a href="/bbs/forum.php?mod=viewthread&tid=[field:tid /]">[field:subject function="cn_substr('@me',28)" /]</a></li> 

{/dede:sql} 

avatar

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: