Skip to content

Support for parameterized select clauses #412

Description

@bch36

When using placeholders in a select clause for a prepared statement, the parser stops at the first placeholder. For example, parsing "SELECT 1, 2, ?, 3" will include the expressions 1 and 2 in the SelectStatement object, but not the placeholder or 3.

PhpMyAdmin\SqlParser\Statements\SelectStatement Object
(
    [expr] => Array
        (
            [0] => PhpMyAdmin\SqlParser\Components\Expression Object
                (
                    [database] => 
                    [table] => 
                    [column] => 
                    [expr] => 1
                    [alias] => 
                    [function] => 
                    [subquery] => 
                )

            [1] => PhpMyAdmin\SqlParser\Components\Expression Object
                (
                    [database] => 
                    [table] => 
                    [column] => 
                    [expr] => 2
                    [alias] => 
                    [function] => 
                    [subquery] => 
                )

        )

    [from] => Array
        (
        )

    [index_hints] => 
    [partition] => 
    [where] => 
    [group] => 
    [having] => 
    [order] => 
    [limit] => 
    [procedure] => 
    [into] => 
    [join] => 
    [union] => Array
        (
        )

    [end_options] => 
    [options] => PhpMyAdmin\SqlParser\Components\OptionsArray Object
        (
            [options] => Array
                (
                )

        )

    [first] => 0
    [last] => 11
)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions