Hi,
I'm wondering if PHQL supported DATE operations using INTERVAL because I got an exception using this :
if(FailedLogin::count(array(
'attempt >= CURRENT_TIMESTAMP - INTERVAL \'1 day\' AND attempt <= CURRENT_TIMESTAMP + INTERVAL \'1 day\''
)) >= 5)
Here is the exception :
Phalcon\Mvc\Model\Exception : Syntax error, unexpected token STRING(1 day), near to ' AND attempt <= CURRENT_TIMESTAMP + INTERVAL '1 day'', when parsing: SELECT COUNT(*) AS rowcount FROM [Nebula\Models\FailedLogin] WHERE attempt >= CURRENT_TIMESTAMP - INTERVAL '1 day' AND attempt <= CURRENT_TIMESTAMP + INTERVAL '1 day' (166)
Back trace says : Phalcon\Mvc\Model\Query->parse()