Code:
<?php
$getsql = mysql_query("SELECT * FROM minibbtable_topics ORDER BY topic_id DESC LIMIT 5");
if($getsql){
if(mysql_num_rows($sql) == 0){
echo 'No recent topics';
}
else
{
while($getdata = mysql_fetch_assoc($sql)){
echo '<a href="forum/index.php?action=vthread&topic='. $getdata['topic_id'] .'">'. text_chop($getdata['topic_title'], 50) .'</a>';
}
}
}
else
{
trigger_error(mysql_error());
}
?>

Help please,
im trying to get the last 5 topics from a miniBB table. Now, it won't work. It just gives back totally nothing.. Can you guys help me?
Thew
Comment