phpcms首页get调用phpwind版块最新帖子
来源:程序员人生 发布时间:2013-10-10 11:57:45 阅读次数:3169次
如何在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`,`fid`,`author`,`subject`,`
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`,`fid`,`author`,`subject`,`
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}
生活不易,码农辛苦
如果您觉得本网站对您的学习有所帮助,可以手机扫描二维码进行捐赠