Re: Re: Call to undefined function: fetchrow
| From: | Lukas Smith | Date: | Thu, 08 Apr 2004 06:19:42 +0000 |
| Subject: | Re: Re: Call to undefined function: fetchrow | ||
| References: | 1 2 3 4 5 6 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-27157@lists.php.net to get a copy of this message | ||
Daniel Convissor wrote:
Hi Lukas: On Wed, Apr 07, 2004 at 11:19:26PM +0200, Lukas Smith wrote:Hmm either way its a BC break which shouldnt happen. From the commit logs its not entirely clear to me if this change tried to fix a bug or to add a feature (allowing scalar values instead of only arrays). Either way this breaks peoples code, which however sloppy it my be, used to work. This is something that shouldnt happen. If it can be reverted it should imho, however if this then breaks new features we are stuck between a rock and a hard place. 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 07I think its caused in DB_common::executeEmulateQuery()Similar code was in there from the start of CVS. The section you're posting was modified in common.php versions 1.41 and 1.49. The commit messages for those versions are: REFINE PREPARE/EXECUTE EMULATION * Allow scalars in addition to arrays. * Eliminate unnecessary variable assignments. * Move error checking up front so it doesn't need to be repeated in for loop. * Reorganize conditional statements to reduce need for executing them. * Raise DB_ERROR_ACCESS_VIOLATION on fopen() failure. * Use fread() instead of while fgets(). * Adjust docblocks to match changes and related realities. and Allow associative arrays to be passed to execute() and (perhaps speed things) up by using foreach instead of for. So, the changes were made for good reasons and adding hacks for people who wrote buggy code doesn't seem appropriate.if (count($this->prepare_types[$stmt]) != count($data)) { $this->last_query = $this->prepared_queries[$stmt]; return $this->raiseError(DB_ERROR_MISMATCH); }