I'm having a poo of a night. I'm trying to transfer MySQL to PEAR but I am having troubles displaying results. The query returns values when run through my mysql query... But now that I go to PEAR:::::: There is no error from the database (as shown in the code), but when I try to retrieve the value from the results it dies.
This dies for fetchRow() as well.
Any help would be appreciated.
Michael.
This is the screen output
[][Object]
Fatal error: Call to undefined function: numrows() in /home/digitala/public_html/classes/class-auth.php on line 55
This is the code
$query = "SELECT * FROM usr";
$db = DB::connect( "mysql://$dbuser:$dbpass@$dbhost/$dbname" );
$db->setFetchMode(DB_FETCHMODE_ASSOC);
echo "[".$result."]";
$result = $db->query($query);
if (DB::isError($db)) {
die ($db->getMessage());
}
echo "[".$result."]";
$numRows = $result->numRows(); // ERROR IS WITH THIS LINE.
$db->disconnect();