oculus
oculus copied to clipboard
Can't use MySQL @-variables in queries
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.