1 頁 (共 1 頁)

[問題]安裝EZportal的Recent Topics問題

發表於 : 2004-08-29 15:47
問題狂
我安裝完Ezportal後...
也安裝了ezportal admin...
最後要安裝"Recent Topics Block"時..
進入portal.php就會出現這樣:

代碼: 選擇全部

Could not query recent topics 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 'FROM phpbb_topics AS t, phpbb_posts AS p, phpbb_users AS u W

SELECT t.topic_id, t.topic_title, t.topic_last_post_id, t.forum_id, p.post_id, p.poster_id, p.post_time, u.user_id, u.username , FROM phpbb_topics AS t, phpbb_posts AS p, phpbb_users AS u WHERE t.forum_id NOT IN ('start') AND t.topic_status <> 2 AND p.post_id = t.topic_last_post_id AND p.poster_id = u.user_id ORDER BY p.post_id DESC LIMIT 

Line : 159
File : c:\appserv\www\phpbb2\portal.php
問題檔的159行如下...
我看了好久都看不出個所以然...QQ
[php]<?php
$sql = "SELECT t.topic_id, t.topic_title, t.topic_last_post_id, t.forum_id, p.post_id, p.poster_id, p.post_time, u.user_id, u.username ,
FROM " . TOPICS_TABLE . " AS t, " . POSTS_TABLE . " AS p, " . USERS_TABLE . " AS u
WHERE t.forum_id NOT IN (" . $except_forum_id . ")
AND t.topic_status <> 2
AND p.post_id = t.topic_last_post_id
AND p.poster_id = u.user_id
ORDER BY p.post_id DESC
LIMIT " . $CFG['number_recent_topics'];
if (!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not query recent topics information', '', __LINE__, __FILE__, $sql);
}

?>[/php]

發表於 : 2004-08-29 15:50
問題狂
發錯版面了...
請版主協助移動至"非官方外掛問題討論區"~ :roll:

發表於 : 2004-08-29 15:50
問題狂
以自行解決...^_^
把:
[php]<?php
$sql = "SELECT t.topic_id, t.topic_title, t.topic_last_post_id, t.forum_id, p.post_id, p.poster_id, p.post_time, u.user_id, u.username
FROM " . TOPICS_TABLE . " AS t, " . POSTS_TABLE . " AS p, " . USERS_TABLE . " AS u
WHERE t.forum_id NOT IN (" . $except_forum_id . ")
AND t.topic_status <> 2
AND p.post_id = t.topic_last_post_id
AND p.poster_id = u.user_id
ORDER BY p.post_id DESC
LIMIT " . $CFG['number_recent_topics'];
?>[/php]
替換成:
[php]<?php
$sql = "SELECT t.topic_id, t.topic_title, t.topic_last_post_id, t.forum_id, p.post_id, p.poster_id, p.post_time, u.user_id, u.username
FROM " . TOPICS_TABLE . " AS t, " . POSTS_TABLE . " AS p, " . USERS_TABLE . " AS u
WHERE t.forum_id NOT IN (" . $except_forum_id . ")
AND t.topic_status <> 2
AND p.post_id = t.topic_last_post_id
AND p.poster_id = u.user_id
ORDER BY p.post_id DESC";
LIMIT . $CFG['number_recent_topics'];
?>[/php]
不知是有誤...QQ

發表於 : 2004-09-05 18:07
神川小羽
移動文章原因~
問題狂 寫:發錯版面了...
請版主協助移動至"非官方外掛問題討論區"~ :roll: