ik krijg : Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in d:\server\www\public\phpbb-latest.php on line 33
Code: Selecteer alles
$url = "/forum";
$ppath = "/forum/config.php";
if(empty($count))
$count = "5";
include_once("$ppath");
$db = @mysql_connect("$dbhost", "$dbuser", "$dbpasswd") or die("here we die at connection");
@mysql_select_db("$dbname",$db) or die("here we die");
$prefix = "$table_prefix";
$query="SELECT * FROM $prefix_topics ORDER BY `topic_id` DESC LIMIT 0, $count";
$result=mysql_query($query);
while($row = mysql_fetch_array($result)) {
$topicid = "$row[topic_id]";
$title = "$row[topic_title]";
$forumid = "$row[forum_id]";
$replies = "$row[topic_replies]";
echo "- <a title=\"$title\" href=\"$url/viewtopic.php?t=$topicid&sid=$forumid\">$title</a> (<i>$replies</i>)<br>";
}
?>