mysql_num_rows() expects parameter 1 to be resource, null given in
Hej!Har et problem med følgende kode :
mysql_num_rows() expects parameter 1 to be resource, null given in
Hvor fejler jeg henne?
public function priv_listrls($line, $args) {
$channel = $line ['to'];
// failsafes ...
if (strpos ( $channel, "#" ) === false)
return;
if ($channel != $this->precfg["rss"])
return;
$sql = "SELECT ctime, rss, nick FROM ".$this->precfg["rssdb"]." ORDER BY ctime DESC";
$qres = $this->db->query("$sql");
if (mysql_num_rows($qres) > "0") {
while ($a = mysql_fetch_assoc($qres)) {
$this->ircClass->privMsg ( $channel, "7RLS: $a[rss] :: 7Added By: $a[nick]");
}
} else {
$this->ircClass->privMsg ( $channel, "4databasen er tom");
}
}