I'm trying to run this query in sql: select * from jobs where completed_at is null and scheduled_for <= date_add(now(), interval 2 hour)
It runs successfully in console. I'm using the find params: [conditions => completed_at is null and scheduled_for <= date_add(now(), interval 2 hour)]
which I'm pretty sure is fine.
However, I'm getting a parse error in the \Mvc\Model\Query class: Syntax error unexpected token integer(2), near to 'hour
.
I'm assuming this is a bug, but wanted to check I'm not doing something stupid beforehand!
I've also tried using the query builder, and the parsing of the DATE_ADD(now(), interval 2 hour)
is certainly problematic
I'm assuming it's related to this bug from 2015? https://forum.phalcon.io/discussion/8919/how-can-i-use-some-mysql-builtin-function-in-phql