cvs: pear /DBA Sql_lex.php

From: Date: Sat, 13 Jul 2002 03:22:28 +0000
Subject: cvs: pear /DBA Sql_lex.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-5087@lists.php.net to get a copy of this message
busterb Fri Jul 12 23:22:28 2002 EDT Modified files: /pear/DBA Sql_lex.php Log: understand quoted strings properly Index: pear/DBA/Sql_lex.php diff -u pear/DBA/Sql_lex.php:1.4 pear/DBA/Sql_lex.php:1.5 --- pear/DBA/Sql_lex.php:1.4 Fri Jul 12 22:14:04 2002 +++ pear/DBA/Sql_lex.php Fri Jul 12 23:22:28 2002 @@ -225,7 +225,8 @@ $c = $this->skip(); $this->tokLen = 1; } - if ($c == '\'') { + if (($c == '\'') || ($c == '"')) { + $quote = $c; $state = 12; break; } @@ -431,14 +432,15 @@ $this->currTok = ''; $bail = true; break; - case '\\': - if ($this->get()) { + case "\\": + if (!$this->get()) { $this->lastTok = $this->currTok; $this->currTok = ''; $bail = true; } + //$bail = true; break; - case '\'': + case $quote: $this->lastTok = $this->currTok; $this->currTok = substr($this->string, $this->tokStart, $this->tokLen); $bail = true;

« previous php.pear.cvs (#5087) next »