以下的修改, 提供您參考:
#
#-----[ FIND ]-----
#
代碼: 選擇全部
$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id ,substring(pt.topic_title,1,18) as topic_title
#
#-----[ REPLACE WITH ]-----
#
代碼: 選擇全部
$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id
#
#-----[ FIND ]-----
#
代碼: 選擇全部
default:
$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id, substring(pt.topic_title,1,18) as topic_title , t.topic_title, t.topic_id
FROM ((( " . FORUMS_TABLE . " f
LEFT JOIN " . POSTS_TABLE . " p ON p.post_id = f.forum_last_post_id )
LEFT JOIN " . TOPICS_TABLE . " t ON t.topic_id = p.topic_id )
LEFT JOIN " . USERS_TABLE . " u ON u.user_id = p.poster_id )
ORDER BY f.cat_id, f.forum_order";
#
#-----[ REPLACE WITH ]-----
#
代碼: 選擇全部
$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id, t.topic_title, t.topic_id, substring(pt.topic_title,1,18) as topic_title
FROM (((( " . FORUMS_TABLE . " f
LEFT JOIN " . POSTS_TABLE . " p ON p.post_id = f.forum_last_post_id )
LEFT JOIN " . TOPICS_TABLE . " t ON t.topic_id = p.topic_id )
LEFT JOIN " . USERS_TABLE . " u ON u.user_id = p.poster_id )
LEFT JOIN " . TOPICS_TABLE . " pt ON pt.topic_id = p.topic_id )
ORDER BY f.cat_id, f.forum_order";