Verfasst: 10.09.2007 21:17
Danke ich hab es jetzt mal probiert und bekomme ständig den folgenden fehler:
Mein code sieht wie folgt aus (Nur zum test gemacht):
Could not get post ID
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 MAX(post_id) AS last_post, MIN(post_id) AS first_post, COUNT(post_id) AS total_posts FROM board_posts WHERE topic_id =
Line : 139
File : functions_admin.php
Mein code sieht wie folgt aus (Nur zum test gemacht):
Code: Alles auswählen
if ( !empty($newsforum) )
{
$sql = "SELECT pu.username AS Username, pp.post_time AS Time, ppt.post_subject AS Überschrift, ppt.post_text AS Text
FROM phpbb_topics pt, phpbb_users pu, phpbb_posts_text ppt, phpbb_posts pp
WHERE pt. topic_first_post_id = pp.post_id
AND pu.user_id = pp.Poster_id
AND pp.post_id = ppt.post_id
AND ppt.post_id > 2
AND pp.forum_id = $newsforum
ORDER BY pp.post_time
DESC ";
$postrow = array();
if ($row = $db->sql_fetchrow($result))
{
do
{
$postrow[] = $row;
}
while ($row = $db->sql_fetchrow($result));
$db->sql_freeresult($result);
$total_posts = count($postrow);
}
else
{
include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
sync('topic', $topic_id);
message_die(GENERAL_MESSAGE, $lang['No_posts_topic']);
}
}
else
{
message_die(GENERAL_MESSAGE, 'Newsforum_not_defined');
}
for($i = 0; $i < $total_posts; $i++)
{
echo $postrow[$i]['post_text'];
}