Skip to content

Bug with pgsql query #177

Open
Open
@chekalsky

Description

If you will try to do this:

$pdo->fetchCol("SELECT id FROM table WHERE removed = false AND data @> '{\"is_hidden\":false}'::jsonb AND type in (:types)", ['types' => [1, 2]]);

you will get an error from DB: SQLSTATE[08P01]: <<Unknown error>>: 7 ERROR: bind message supplies 0 parameters, but prepared statement "pdo_stmt_00000001" requires 1

And this is because :types will be skipped here.

Activity

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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions