php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #57075 PDO_User::parseSQL() doesn't like * in field list
Submitted: 2006-06-10 12:34 UTC Modified: 2006-06-10 16:35 UTC
From: tech-php at sklar dot com Assigned: pollita (profile)
Status: Closed Package: pdo_user (PECL)
PHP Version: 5.1.2 OS: Linux
Private report: No CVE-ID: None
 [2006-06-10 12:34 UTC] tech-php at sklar dot com
Description:
------------
PDO_User::parseSQL() produces a warning and returns false when given an SQL statement with a * field list (instead of a comma-delimited list of actual fields)

Reproduce code:
---------------
$sql = 'SELECT * FROM somewhere WHERE bleep = 27';
var_dump(PDO_User::parseSQL($sql));



Expected result:
----------------
What I'd get with code such as:

$sql = 'SELECT something FROM somewhere WHERE bleep = 27';
var_dump(PDO_User::parseSQL($sql));

Except with '*' as the first element of the 'fields' sub-array instead of 'something'.


Actual result:
--------------
PHP Warning:  PDO_User::parsesql(): Failure parsing SQL statement at: * FROM somewhere WHERE bleep = 27 in test.php on line 9
bool(false)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-06-10 16:35 UTC] pollita@php.net
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.


 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Mon Jul 13 09:01:23 2020 UTC