phpcms首页get调用phpwind版块最新帖子

前端之家收集整理的这篇文章主要介绍了phpcms首页get调用phpwind版块最新帖子前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
如何在PHPcms首页get调用PHPwind论坛某一版块的最新帖子?要求标题带有地址链接

研究一下,已经自己搞定

某版块最新10条正确表达:
        {get dbsource="pw" sql="SELECT `tid`,`fid`,`author`,`subject`,`lastpost` FROM `pw_threads` WHERE `fid` = '13'  ORDER BY  `lastpost` DESC" rows="10" }
          <li><a href="../PHPwind/read.PHP?tid-{$r[tid]}.html" }">{str_cut($r[subject],45)}</a></li>
        {/get}

某版块精华10条正确表达:
        {get dbsource="pw" sql="SELECT `tid`,`digest` FROM `pw_threads` WHERE `fid` = '13'  ORDER BY  `digest` DESC" rows="10" }
          <li><a href="../PHPwind/read.PHP?tid-{$r[tid]}.html" }">{str_cut($r[subject],45)}</a></li>
        {/get}

多个版块最新10条正确表达:
        {get dbsource="pw" sql="SELECT `tid`,`lastpost` FROM `pw_threads` WHERE `fid`IN(3,22,26) ORDER BY  `lastpost` DESC" rows="10" }
          <li><a href="../PHPwind/read.PHP?tid-{$r[tid]}.html" }">{str_cut($r[subject],45)}</a></li>
        {/get}

猜你在找的Dedecms相关文章