Re: Bug with MDB2 cvs and DB_DataObject
| From: | Dan Rossi | Date: | Wed, 23 Nov 2005 02:00:21 +0000 |
| Subject: | Re: Bug with MDB2 cvs and DB_DataObject | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-40476@lists.php.net to get a copy of this message | ||
On 22/11/2005, at 9:24 PM, Lukas Smith wrote:
Dan Rossi wrote:From within the DO it doesnt use exec just query and always attempts to return numrows(). So what you are saying you should never return numrows for manipulation queries ? Maybe something to keep in mind for a further release to work in the modified DO package to accomodate MDB2 , should there be a warning about this in the future ?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 soMDB2 CVS just separated the API for manipulation and select statements. maniplation queries should not use exec() and get an integer returned with the affected rows select statements should continue to use the query() method for prepared queries there is an optional parameter to determine if its a manipulation query or not (default is not) regards, Lukas