Open NikitaKharkov opened 3 years ago
Hello @NikitaKharkov, thank you for your report.
The parser is in fact returning this as a ColRef
(instead of a Reserved
). You can avoid the issue using the SQL_TSI_*
constants as such:
TIMESTAMPDIFF(SQL_TSI_SECOND, uc_call.created_at, uc_call.ended_at) - uc_call.duration as waiting
After a bit of digging this issue comes from https://github.com/greenlion/PHP-SQL-Parser and it seems that it has already been reported: https://github.com/greenlion/PHP-SQL-Parser/issues/212.
So the problem is pretty simple:
The original:
The result:
So, it makes the first argument as a ColRef, but should as... I even don't know :) Because I didn't find any class which can be matched with the date/time reserved words.