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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: clay at killersoft dot com
New email:
PHP Version: OS:

 

 [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: Fri Apr 19 13:01:30 2024 UTC