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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: tech-php at sklar dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 01 14:01:37 2025 UTC