php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57606 parseSQL chops leading s characters
Submitted: 2007-04-04 13:49 UTC Modified: 2016-12-30 16:03 UTC
From: clay at killersoft dot com Assigned:
Status: Suspended Package: pdo_user (PECL)
PHP Version: 5.2.1 OS: Irrelevant
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
41 - 30 = ?
Subscribe to this entry?

 
 [2007-04-04 13:49 UTC] clay at killersoft dot com
Description:
------------
Any fields, table names or WHERE clause parameters that begin with the letter 's' have the 's' character dropped.

Reproduce code:
---------------
$q = "SELECT smiley FROM face WHERE sad != 1";
$parsed = PDO_User::parseSQL($q);
print_r($parsed);

Expected result:
----------------
Array
(
    [type] => statement
    [statement] => select
    [fields] => Array
        (
            [0] => smiley
        )

    [from] => face
    [modifiers] => Array
        (
            [where] => Array
                (
                    [type] => condition
                    [op1] => sad
                    [condition] => !=
                    [op2] => 1
                )

        )

    [terminating-semicolon] => 
)

Actual result:
--------------
Array
(
    [type] => statement
    [statement] => select
    [fields] => Array
        (
            [0] => miley
        )

    [from] => face
    [modifiers] => Array
        (
            [where] => Array
                (
                    [type] => condition
                    [op1] => ad
                    [condition] => !=
                    [op2] => 1
                )

        )

    [terminating-semicolon] => 
)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-12-30 16:03 UTC] cmb@php.net
-Status: Open +Status: Suspended
 [2016-12-30 16:03 UTC] cmb@php.net
It appears that PECL/pdo_user is unmaintained, so I'm suspending
this ticket.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 23:01:27 2024 UTC