I ahve the following code in a class called SQL to query the database:
//function to query database
function query_db($the_query) {
$this->query_id = @mysql_query($the_query);
if (mysql_errno() > 0)
{
return false;
}
return $this->query_id;
} // end query_db();
This works perfectly well. I also ahve this code to see how many rows were returned
function num_rows() {
return mysql_num_rows($this->query_id);
}
So why does this code not work?
function num_rows() {
return mysql_affected_rows($this->query_id);
}
The following error appears:
Warning: mysql_affected_rows(): supplied argument is not a valid MySQL-Link resource in c:\program files\easyphp1-8\www\projects\shmojo\v2\live\flash\php\files for subdomains\subdomain mailinglist\driver.php on line 43
any pointers appreciated!