Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

辩论主题 筛选出错

[复制链接]
adreamsky 发表于 2012-5-10 16:17:01 | 显示全部楼层 |阅读模式
本帖最后由 adreamsky 于 2012-5-10 16:19 编辑

可以成功发布辩论的主题,按立场筛选有三个选项,正方,反方,中立 ,随便点哪个选项都会出现错误,(我的浏览器IE9,但用了QQ浏览器还是一样的)
出错之前是这个网址:http://www.zhixiaotang.com/thread-719-1-1.html
http://www.zhixiaotang.com/forum.php?mod=viewthread&tid=719&extra=page%3D1&stand=0 (这是出错之后的)


错误页面代码是:

Discuz! Database Error(1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1 ORDER BY p.dateline LIMIT 10' at line 1 SELECT dp.*, p.* FROM forum_post p LEFT JOIN forum_debatepost dp ON p.pid=dp.pid WHERE p.tid=719 AND p.`invisible`='0'1 ORDER BY p.dateline LIMIT 10

PHP Debug
No.FileLineCode
1forum.php58require(%s)
2source/module/forum/forum_viewthread.php536table_forum_post->fetch_all_debatepost_viewthread_by_tid(%s, %s, %d, %s, false, %d, %d, %d)
3source/class/table/table_forum_post.php216discuz_database::query(%s, Array)
4source/class/discuz/discuz_database.php136db_driver_mysql->query(%s, false, false)
5source/class/db/db_driver_mysql.php151db_driver_mysql->halt(%s, %d, %s)
6source/class/db/db_driver_mysql.php218break()

m.king 发表于 2012-5-11 16:59:59 | 显示全部楼层
该问题我们已经收集 感谢你的反馈!
回复

使用道具 举报

 楼主| adreamsky 发表于 2012-5-12 16:08:15 | 显示全部楼层
m.king 发表于 2012-5-11 16:59
该问题我们已经收集 感谢你的反馈!

现在还不能解决吗?
回复

使用道具 举报

ppluntan 发表于 2012-5-17 11:46:31 | 显示全部楼层
(1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1 ORDER BY p.dateline LIMIT 12' at line 1
SELECT dp.*, p.* FROM forum_post p LEFT JOIN forum_debatepost dp ON p.pid=dp.pid WHERE p.tid=50100 AND p.`invisible`='0'1 ORDER BY p.dateline LIMIT 12
回复

使用道具 举报

ppluntan 发表于 2012-5-18 09:40:57 | 显示全部楼层
m.king 发表于 2012-5-11 16:59
该问题我们已经收集 感谢你的反馈!

什么时候解决这个问题哇,这个太明显了!
回复

使用道具 举报

冬日阳光_雨 发表于 2012-5-20 10:28:55 | 显示全部楼层
我的也是这个问题,不知什么时候能解决?
回复

使用道具 举报

sumnerboy 发表于 2012-5-28 16:25:28 | 显示全部楼层
这个是mysql语句有问题
找到/source/class/table/table_forum_post.php里的fetch_all_debatepost_viewthread_by_tid
替换下面内容
  1. public function fetch_all_debatepost_viewthread_by_tid($tid, $visibleallflag, $authorid, $stand, $forum_pagebydesc, $ordertype, $start, $limit) {
  2.                                 
  3.                 $data = array();
  4.                 $parameter = $this->handle_viewthread_parameter($visibleallflag, $authorid, $forum_pagebydesc, $ordertype, 'p.');
  5.                
  6.                 $query = DB::query("SELECT dp.*, p.* FROM %t p LEFT JOIN %t dp ON p.pid=dp.pid WHERE p.tid=%d".
  7.                                 ($parameter['invisible'] ? ' AND '.$parameter['invisible'] : '').($parameter['authorid'] ? ' AND '.$parameter['authorid'] : '').
  8.                                 (isset($stand) ? ' AND (dp.stand=%d OR p.first=1)' : ' AND (dp.stand=0 OR dp.stand IS NULL OR p.first=1)').
  9.                                 ' '.$parameter['orderby'].
  10.                                 ' '.DB::limit($start, $limit),
  11.                                 array(self::get_tablename('tid:'.$tid), 'forum_debatepost', $tid, $stand));
  12.                 while($post = DB::fetch($query)) {
  13.                         $data[$post['pid']] = $post;
  14.                 }
  15.                 return $data;
  16.         }
复制代码
回复

使用道具 举报

 楼主| adreamsky 发表于 2012-5-30 10:52:23 | 显示全部楼层
sumnerboy 发表于 2012-5-28 16:25
这个是mysql语句有问题
找到/source/class/table/table_forum_post.php里的fetch_all_debatepost_viewthre ...

谢谢,以解决
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2025-5-16 15:48 , Processed in 0.050650 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表