Skip to content

Use backtick around column name in WHERE statement #18

@jmslbam

Description

@jmslbam

I have column named key which is a reserved word in MySQL.

If you don't use a backtick ``` in you SQL query then will error.

My SQL that was build by this library was SELECT * FROM secure_holiday_feature WHERE key = '2' which didn't give any result.

This one did SELECT * FROM secure_holiday_feature WHERE key = 2.

It also messes up the ->update() query.

Kind regads,

Jaime

Metadata

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