Discuz! info: MySQL Query Error
Time: 2005-6-3 11:17am
Script: /Discuz/redirect.php
SQL: SELECT f.* , t.* FROM cdb_forums f, cdb_threads t WHERE f.fid=6 AND f.fid=t.fid AND displayorder>='0' ORDER BY t.lastpost DESC LIMIT 1
Error: Column: 'displayorder' in where clause is ambiguous
Errno.: 1052
An error report has been dispatched to our administrator.
打开viewthread.php
找到:
- WHERE $followforumadd AND displayorder>='0'
复制代码
把 displayorder>='0'改成:
if($allowdelpost && $forum['recyclebin']) {
$db->query("UPDATE $table_threads SET displayorder='-1', digest='0', threads_moderate='2', threads_moderatetime='$timestamp', threads_moderator='$discuz_user', threads_moderatorid='$discuz_uid' WHERE tid='$tid'");
$db->query("UPDATE $table_posts SET invisible='-1' WHERE tid='$tid'");
}else
这个问题打开editpost.php
找到:
- if($allowdelpost && $forum['recyclebin']) {
- $db->query("UPDATE $table_threads SET displayorder='-1', digest='0', threads_moderate='2', threads_moderatetime='$timestamp', threads_moderator='$discuz_user', threads_moderatorid='$discuz_uid' WHERE tid='$tid'");
- $db->query("UPDATE $table_posts SET invisible='-1' WHERE tid='$tid'");
- }else
复制代码
改为:
- if($allowdelpost && $forum['recyclebin']) {
- $db->query("UPDATE $table_threads SET displayorder='-1', digest='0' WHERE tid='$tid'");
- $db->query("UPDATE $table_posts SET invisible='-1' WHERE tid='$tid'");
- }else{
复制代码
不好意思,我编辑了这个帖子,没经过测试,这些都是安装了第三方Hack所致的,现在测试了,没问题。。。真抱歉。。
[ Last edited by 8度空间 on 2005-6-3 at 16:21 ] |