cvs: pear /DBA_Relational Table.php
| From: | Brent Cook | Date: | Wed, 15 Jan 2003 05:47:10 +0000 |
| Subject: | cvs: pear /DBA_Relational Table.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-8272@lists.php.net to get a copy of this message | ||
busterb Wed Jan 15 00:47:10 2003 EDT
Modified files:
/pear/DBA_Relational Table.php
Log:
fix bug in quoted string handling in queries
Index: pear/DBA_Relational/Table.php
diff -u pear/DBA_Relational/Table.php:1.13 pear/DBA_Relational/Table.php:1.14
--- pear/DBA_Relational/Table.php:1.13 Tue Jan 14 01:30:55 2003
+++ pear/DBA_Relational/Table.php Wed Jan 15 00:47:10 2003
@@ -18,7 +18,7 @@
// | Foundation, Inc., 59 Temple Place, Suite 330,Boston,MA 02111-1307 USA|
// +----------------------------------------------------------------------+
//
-// $Id: Table.php,v 1.13 2003/01/14 06:30:55 busterb Exp $
+// $Id: Table.php,v 1.14 2003/01/15 05:47:10 busterb Exp $
//
require_once 'PEAR.php';
require_once 'DBA.php';
@@ -1034,6 +1034,7 @@
$inQuote = !$inQuote;
$quote = '';
}
+ $token .= $c;
} elseif (isset($this->_operators[$c]) || $c == ' ') {
if (!$inQuote && strlen($token)) {
$PHPQuery .= $this->_cookIdentToken($token);
@@ -1060,7 +1061,7 @@
function _cookIdentToken($token)
{
// quoted string
- if ($token{0} == "'" && $token{0} == '"') {
+ if ($token{0} == "'" || $token{0} == '"') {
$cookedToken .= $token;
} elseif ($token == 'null' || $token == 'and' || $token ==
'or' ||
$token == 'false' || $token == 'true' ||