BBS出错 - Invision Power Board Database Error
今天回来一看进入BBS首页出错,提示如下:Invision Power Board Database Error
There appears to be an error with the 无 为 而 为 database.
You can try to refresh the page by clicking here, if this does not fix the error, you can contact the board administrator by clicking here
Error Returned
mySQL query error: SELECT f.*, c.id as cat_id, c.position as cat_position, c.state as cat_state, c.name as cat_name, c.description as cat_desc,
c.image, c.url, m.member_name as mod_name, m.member_id as mod_id, m.is_group, m.group_id, m.group_name, m.mid
FROM ibf_forums f, ibf_categories c
LEFT JOIN ibf_moderators m ON (f.id=m.forum_id)
WHERE c.id=f.category
ORDER BY c.position, f.position
mySQL error: Unknown column 'f.id' in 'on clause'
mySQL error code:
Date: Thursday 15th of June 2006 09:46:07 PM
We apologise for any inconvenience
google搜索了一下,发现问题,原来是后台数据库升级到了MySQL 5.x,有一句SQL不兼容造成的,做如下修改即可:
修改sources/Boards.php文件,将
$DB->query("SELECT f.*, c.id as cat_id, c.position as cat_position, c.state as cat_state, c.name as cat_name, c.description as cat_desc,
c.image, c.url, m.member_name as mod_name, m.member_id as mod_id, m.is_group, m.group_id, m.group_name, m.mid
FROM ibf_forums f, ibf_categories c
LEFT JOIN ibf_moderators m ON (f.id=m.forum_id)
WHERE c.id=f.category
ORDER BY c.position, f.position");
改为
$DB->query("SELECT f.*, c.id as cat_id, c.position as cat_position, c.state as cat_state, c.name as cat_name, c.description as cat_desc,
c.image, c.url, m.member_name as mod_name, m.member_id as mod_id, m.is_group, m.group_id, m.group_name, m.mid
FROM ( ibf_forums f, ibf_categories c )
LEFT JOIN ibf_moderators m ON (f.id=m.forum_id)
WHERE c.id=f.category
ORDER BY c.position, f.position");
『参考网址』http://www.internetvibes.net/forum/index.php?showtopic=3238
已有1位网友发表了看法:
发表评论