Bug with MDB2 cvs and DB_DataObject

From: Date: Tue, 22 Nov 2005 08:37:08 +0000
Subject: Bug with MDB2 cvs and DB_DataObject
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-22052@lists.php.net to get a copy of this message
ive been forced to use the cvs of MDB2 to get the liveuser package to work properly, however when i just went and updated everything i ran into a bug with my dataobjects. I have a method within one of my dataobjects running a query to set some mysql variables like so $this->query("SET @days_left:=DAY(LAST_DAY(NOW())) - DAY(NOW())"); Within the query method for dataobject its calling the numrows method , obviouslly this isnt going to return any rows or something but it causes an error of so Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /Volumes/DATA/www/classes/PEAR/MDB2/Driver/mysql.php at line 933 (/Volumes/DATA/www/classes/PEAR/MDB2/Driver/mysql.php) (/Volumes/DATA/www/classes/PEAR/DB/DataObject.php) (/Volumes/DATA/www/classes/PEAR/DB/DataObject.php) (/Volumes/DATA/www/hardgayfeeds/classes/DataObjects/Customers.php) (/Volumes/DATA/www/hardgayfeeds/classes/Feeds/Admin/Customers/Details.php) somehow there is a prob here in the mysql MDB2 driver in cvs or something $rows = @mysql_num_rows($this->result); My workaround is to reconfigure the sql and place the setting of variables in the select query of the DO for now :\ Is there anything i can do ?

« previous php.pear.general (#22052) next »