Home >Backend Development >PHP Tutorial >discuz-调用楼主新帖数据代码出现问题,求指教(php)

discuz-调用楼主新帖数据代码出现问题,求指教(php)

WBOY
WBOYOriginal
2016-06-02 11:31:301217browse

phpdiscuzsqlphpmyadmin

大家好。

这段代码放在viewthread里,想调用楼主帖子,但是页面空白,不能实现目的。

<code><!--{eval $threads = DB::fetch_all("SELECT tid FROM ".DB::('forum_thread')." WHERE authorid = ".$postlist['authorid']." AND displayorder >=0 ORDER BY `dateline` DESC LIMIT 0, 5");}--><!--{loop $threads $thread}--><li><a href="forum.php?mod=viewthread&tid='.%24thread%5Btid%5D.'" target="_blank">'.$thread[subject].'</a></li>
<!--{/loop}--></code>

换成这段代码,也无效:

<code><!--{eval $threads = C::t('forum_thread')->fetch_all_by_authorid_displayorder(array_keys($tids), $displayorder, $dglue, $postlist[authorid];}--><!--{loop $threads $thread}--><li><a href="forum.php?mod=viewthread&tid='.%24thread%5Btid%5D.'" target="_blank">'.$thread[subject].'</a></li>
<!--{/loop}--></code>

已经折腾好久了,还是无效。
求指点一二,感激不尽。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn