nach dem Installieren von Staff Posts 1.0.9 bekomme ich folgende Fehlerrmeldung:
Die entsprechende Stelle im index.php (Zeilen 413-421):Could not get post 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 '' at line 3
SELECT post_id, post_time, poster_id FROM xx_posts WHERE post_id =
Line : 419
File : index.php
Code: Alles auswählen
$sql = 'SELECT post_id, post_time, poster_id
FROM ' . POSTS_TABLE . '
WHERE post_id = ' . $topicinfo['topic_last_post_id'];
$db->sql_freeresult($result);
if (!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not get post information','',__LINE__,__FILE__,$sql);
}
$last_post_info = $db->sql_fetchrow($result);Code: Alles auswählen
#
#-----[ OPEN ]------------------------------------------
#
index.php
#
#-----[ FIND ]------------------------------------------
#
$sql = "SELECT t.forum_id,
#
#-----[ BEFORE, ADD ]-----------------------------------
#
$checkstaff = ($userdata['user_level'] != ADMIN && $userdata['user_level'] != MOD) ? ' AND t.topic_staff = 0' : '';
#
#-----[ FIND ]------------------------------------------
#
WHERE p.post_id = t.topic_last_post_id
#
#-----[ IN-LINE FIND ]----------------------------------
#
t.topic_last_post_id
#
#-----[ IN-LINE AFTER, ADD ]----------------------------
#
$checkstaff
#
#
#-----[ FIND ]------------------------------------------
#
$posts =
#
#-----[ BEFORE, ADD ]-----------------------------------
#
if ($userdata['user_level'] != ADMIN && $userdata['user_level'] != MOD)
{
$sql = 'SELECT topic_id
FROM ' . TOPICS_TABLE . '
WHERE topic_staff = 1';
if (!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR,'Could not find topic information','',__LINE__,__FILE__,$sql);
}
$topic = $db->sql_fetchrowset($result);
for ($k = 0; isset($topic[$k]); $k++)
{
$forum_data[$j]['forum_topics']--;
$sql = 'SELECT post_id
FROM ' . POSTS_TABLE . '
WHERE topic_id = ' . $topic[$k]['topic_id'];
if (!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR,'Could not find post information','',__LINE__,__FILE__,$sql);
}
$forum_data[$j]['forum_posts'] -= $db->sql_numrows($result);
}
}
#
#-----[ FIND ]------------------------------------------
#
if ( $forum_data[$j]['forum_last_post_id'] )
{
#
#-----[ AFTER, ADD ]------------------------------------
#
if ($userdata['user_level'] != ADMIN && $userdata['user_level'] != MOD)
{
$sql = 'SELECT topic_last_post_id
FROM ' . TOPICS_TABLE . '
WHERE forum_id = ' . $forum_id . '
AND topic_staff = 0
ORDER BY topic_last_post_id DESC LIMIT 0,1';
if (!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not get topic information','',__LINE__,__FILE__,$sql);
}
$topicinfo = $db->sql_fetchrow($result);
$sql = 'SELECT post_id, post_time, poster_id
FROM ' . POSTS_TABLE . '
WHERE post_id = ' . $topicinfo['topic_last_post_id'];
$db->sql_freeresult($result);
if (!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not get post information','',__LINE__,__FILE__,$sql);
}
$last_post_info = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$forum_data[$j]['post_time'] = $last_post_info['post_time'];
$forum_data[$j]['user_id'] = $last_post_info['poster_id'];
$sql = 'SELECT username
FROM . ' . USERS_TABLE . '
WHERE user_id = ' . $last_post_info['poster_id'];
if (!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not open users table','',__LINE__,__FILE__,$sql);
}
$userinfo = $db->sql_fetchrow($result);
$forum_data[$j]['post_username'] = $userinfo['username'];
$forum_data[$j]['username'] = $userinfo['username'];
$forum_data[$j]['forum_last_post_id'] = $last_post_info['post_id'];
}Gruss
Holger