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
 [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

Pull Requests

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: Sun Oct 13 08:01:26 2024 UTC