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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
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

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-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 10:01:28 2024 UTC