Re: Re: Call to undefined function: fetchrow
| From: | Lukas Smith | Date: | Wed, 07 Apr 2004 21:19:26 +0000 |
| Subject: | Re: Re: Call to undefined function: fetchrow | ||
| References: | 1 2 3 4 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-27141@lists.php.net to get a copy of this message | ||
Daniel Convissor wrote:
Hi Lukas: On Wed, Apr 07, 2004 at 10:44:25PM +0200, Lukas Smith wrote:It never was. This is sloppy code. Probably ported from the native API.Since when was passing the DB object to the second argument of query() ever a valid syntax? The first release of DB in CVS is 1.2 and the current syntax is in use even back then.Luc de Louw wrote:$handle = DB::connect($dsn,true); $query = "SELECT quota FROM domain"; $result4 = $handle->query($query, $handle);
A mismatch error. I think its caused in DB_common::executeEmulateQuery()Appearently inside the pearweb code was a similar typo which until the recent DB update caused no problems. Espescially since this was just a "lets make things cleaner" fix I suggest that its reverted to prevent more people from stumbling over this BC break.What changed where? What's the complete error message that comes up?
if (count($this->prepare_types[$stmt]) != count($data)) {
$this->last_query = $this->prepared_queries[$stmt];
return $this->raiseError(DB_ERROR_MISMATCH);
}
For all I know this check was recently added.
I understand the reasoning for having it in there. If it was there from day one it would be a good idea to have. However adding it now breaks sloppy code for no good reason, as this code worked flawlessly before.
regards,
Lukas Smith
smith@backendmedia.com
_______________________________
BackendMedia
www.backendmedia.com
berlin@backendmedia.com
Linn Zwoch Smith GbR
Pariser Str. 44
D-10707 Berlin
Tel +49 30 83 22 50 00
Fax +49 30 83 22 50 07