cvs: pear /SQL_Parser Parser.php

From: Date: Fri, 06 Jul 2007 10:44:42 +0000
Subject: cvs: pear /SQL_Parser Parser.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-47883@lists.php.net to get a copy of this message
cybot Fri Jul 6 10:44:42 2007 UTC Modified files: /pear/SQL_Parser Parser.php Log: Bug #11464 FROM is not required for SELECT http://cvs.php.net/viewvc.cgi/pear/SQL_Parser/Parser.php?r1=1.40&r2=1.41&diff_format=u Index: pear/SQL_Parser/Parser.php diff -u pear/SQL_Parser/Parser.php:1.40 pear/SQL_Parser/Parser.php:1.41 --- pear/SQL_Parser/Parser.php:1.40 Thu Apr 19 01:31:22 2007 +++ pear/SQL_Parser/Parser.php Fri Jul 6 10:44:42 2007 @@ -25,7 +25,7 @@ // | John Griffin <jgriffin316@netscape.net> | // +----------------------------------------------------------------------+ // -// $Id: Parser.php,v 1.40 2007/04/19 01:31:22 dufuz Exp $ +// $Id: Parser.php,v 1.41 2007/07/06 10:44:42 cybot Exp $ // // The plan for moving forward: // - Refactor sentinel conditions to show flow @@ -989,7 +989,7 @@ return $this->raiseError('Expected columns or a set function'); } - while ($this->token != 'from') { + while ($this->token != 'from' && $this->token != null) { if ($this->token == 'ident') { $prevTok = $this->token; $prevTokText = $this->lexer->tokText; @@ -1061,7 +1061,9 @@ } } if ($this->token != 'from') { - return $this->raiseError('Expected "from"'); + // from is not required in SELECT statements + //return $this->raiseError('Expected "from"'); + return $tree; } $this->getTok(); while ($this->token == 'ident') {

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