#25046 [NEW]: autoUpdate() function within PEAR DB Error Out

From: Date: Mon, 11 Aug 2003 21:23:01 +0000
Subject: #25046 [NEW]: autoUpdate() function within PEAR DB Error Out
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-19535@lists.php.net to get a copy of this message
From: robhines at sbcglobal dot net Operating system: RedHat Linux PHP version: 4.3.2 PHP Bug Type: PEAR related Bug description: autoUpdate() function within PEAR DB Error Out Description: ------------ When attempting to use the autoUpdate() function within PEAR DB I was continually getting error msgs. Upon further inspection I traced the problem to an apparent typo on ~line 562 of the /usr/share/pear/DB/common.php file. Here is a snippet of the code I found there: function buildManipSQL($table, $table_fields, $mode, $where = false) <...> if ($where) { $sql .= " WHERE $sql"; <--BAD CODE [rsh] } <...> } Here is how I modified it so that it now works as advertised. function buildManipSQL($table, $table_fields, $mode, $where = false) <...> if ($where) { $sql .= " WHERE $where"; //This code works! [rsh] } <...> } I hope that helps. Thanks for all your hard work! -- Edit bug report at http://bugs.php.net/?id=25046&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25046&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25046&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=25046&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=25046&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=25046&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=25046&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=25046&r=support Expected behavior: http://bugs.php.net/fix.php?id=25046&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=25046&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=25046&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=25046&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25046&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=25046&r=dst IIS Stability: http://bugs.php.net/fix.php?id=25046&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=25046&r=gnused

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