如何在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}