Skip to content

Can't use MySQL @-variables in queries #18

@acrookston

Description

@acrookston

Try this query:

set @now = (select convert_tz(now(), '-07:00', '-0:00'));
set @newest_date = (select date_add(@now, interval -18 hour));

Notice the MySQL server will respond with:

Problem! You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'set @newest_date = (select date_add(@now, interval -18 hour))' at line 3

Without having troubleshooted this issue, I think it's a parsing bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions