#21430 [Opn->Csd]: BuildManipSQL is not returning the correct query when building an update stmt

From: Date: Sun, 05 Jan 2003 14:16:12 +0000
Subject: #21430 [Opn->Csd]: BuildManipSQL is not returning the correct query when building an update stmt
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-12132@lists.php.net to get a copy of this message
ID: 21430 Updated by: fab@php.net Reported By: ritzcoder@yahoo.com -Status: Open +Status: Closed Bug Type: PEAR related Operating System: Windows XP PHP Version: 4.3.0 New Comment: This bug has been fixed in CVS. In case this was a PHP problem, snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites in short time. Thank you for the report, and for helping us make PHP better. Thanks for the report. Of course, your patch is correct. Yet, it was already fixed in CVS. Previous Comments: ------------------------------------------------------------------------ [2003-01-05 07:51:40] ritzcoder@yahoo.com Hello. I would like to report a bug in common.php of the pear:DB class. In the function buildManipSQL, the code is incorrectly building the sql statement. You have the following starting on line 528: if ($where) { $sql .= " WHERE $sql"; } This code repeats the entire query after the where clause. Instead it should read: if ($where) { $sql .= " WHERE $where"; } Just wanted to report this - it was frustrating me for a while and I decided to peek inside and see what the problem was. Hope this helps. By the way, I searched for this bug but did not see it anywhere yet. If someone has reported it already, sorry for the double post. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=21430&edit=1

« previous php.pear.dev (#12132) next »