<?php
$ophalen = mysql_query("SELECT SUBSTRING(post_text FROM 1 FOR 10), post_id FROM phpbb_posts_text ORDER BY post_id DESC LIMIT 0, 10") OR DIE(mysql_error());
?>Helaas krijg ik niks geprint van de post_text column. Tuurlijk gaat de post_id column wel zonder foutjes. Ik krijg o.a de volgende errors:
Notice: Undefined index: post_text in /home/firstdrop/domains/firstdrop.nl/public_html/includes/lforummessage.php on line 29En dat nog 10x zo door. Regel 29 is dit:
<?php
echo "<a href=\"http://www.firstdrop.nl/forum/viewtopic.php?p=".$row['post_id']."#".$row['post_id']."\">".$row['post_text']."</a><br />";
?>En mijn gehele script:
<?php
error_reporting(E_ALL);
//Made by Remy
//Last Forum Message (PHPbb)
if (!mysql_select_db("*****", mysql_connect("******", "*****", "******")))
{
echo "Er kon geen connectie worden gemaakt met de database.";
include 'inc_footer.php';
exit;
}
$ophalen = mysql_query("SELECT SUBSTRING(post_text FROM 1 FOR 10), post_id FROM phpbb_posts_text ORDER BY post_id DESC LIMIT 0, 10") OR DIE(mysql_error());
while($row = mysql_fetch_array($ophalen))
{
$sqll = mysql_query("SELECT forum_id FROM phpbb_posts WHERE post_id = ".$row['post_id']." LIMIT 1") OR DIE(mysql_error());
while($controle = mysql_fetch_array($sqll))
{
if($controle['forum_id'] == "2")
{
//DAN SLAAT HIJ HEM OVER!
}
else
{
echo "<a href=\"http://www.firstdrop.nl/forum/viewtopic.php?p=".$row['post_id']."#".$row['post_id']."\">".$row['post_text']."</a><br />";
}
}
}
?>
Iemand? Alvast bedankt! :)