[求助]無法於 modcp 刪除主題 (已解決)
發表於 : 2005-05-02 10:50
問題外掛:區分發表主題與回覆
使用版本:phpBB 2.0.14
架站程式:Apache 2.0.52 + MySQL 4.0.22 + PHP 4.3.10 + phpMyAdmin 2.6.0 pl3
網站位置:localhost
狀況描述:
在 modcp 刪除主題時出現錯誤:
Line 323 是\r
研判是此 MOD 修改 modcp.php 程式碼所造成
因原作者網站已無法訪問,故在此請教該如何解決?
使用版本:phpBB 2.0.14
架站程式:Apache 2.0.52 + MySQL 4.0.22 + PHP 4.3.10 + phpMyAdmin 2.6.0 pl3
網站位置:localhost
狀況描述:
在 modcp 刪除主題時出現錯誤:
與錯誤訊息有關的 mopcp.php 程式碼\rCould not update user post count information
DEBUG MODE
SQL 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 'user_reply = user_reply - 9 WHERE user_id = 2' at line 3
UPDATE phpbb_users SET user_reply = user_reply + 1 WHERE user_id = 2
Line : 323
File : modcp.php
代碼: 選擇全部
while ( $row = $db->sql_fetchrow($result) )
{
$count_sql[] = "UPDATE " . USERS_TABLE . "
SET user_posts = user_posts - " . $row['posts'] . "
user_reply = user_reply - " . $row['posts'] . "
WHERE user_id = " . $row['poster_id'];
}
$db->sql_freeresult($result);
if ( sizeof($count_sql) )
{
for($i = 0; $i < sizeof($count_sql); $i++)
{
if ( !$db->sql_query($count_sql[$i]) )
{
message_die(GENERAL_ERROR, 'Could not update user post count information', '', __LINE__, __FILE__, $sql);
}
}
}
$sql = "SELECT post_id
FROM " . POSTS_TABLE . "
WHERE topic_id IN ($topic_id_sql)";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not get post id information', '', __LINE__, __FILE__, $sql);
}代碼: 選擇全部
message_die(GENERAL_ERROR, 'Could not update user post count information', '', __LINE__, __FILE__, $sql);因原作者網站已無法訪問,故在此請教該如何解決?