PHQL Syntax error on MySQL Function ADDDATE or DATE_ADD

Hi guys I am getting syntax error on PHQL query while I can get result when I directly run it in MySQL..

    Syntax error, unexpected token INTEGER(1), near to ' DAY) WHERE F.fId= '2' AND T.tId = '1' ', when parsing: SELECT F.* FROM App\Models\FTable AS F INNER JOIN App\Models\TTable AS T ON F.startDate = ADDDATE(T.endDate,INTERVAL 1 DAY) WHERE F.fId= '2' AND T.tId = '1'

Hey, im pretty sure you have to use mysql built in functions this way: https://docs.phalconphp.com/en/latest/api/Phalcon%5Db%5RawValue.html

Without your php code thats my best guess :)



3.8k

tnx.. the thing is, it's been simplified by me.. it s going to use dynamic INTERVAL DAY as paramater. so how can I use this in this situation even now!?

Hey, im pretty sure you have to use mysql built in functions this way: https://docs.phalconphp.com/en/latest/api/Phalcon%5Db%5RawValue.html

Without your php code thats my best guess :)

Can you show us your php code?