We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

SQL INTERVAL

hi,

this is my query

SELECT * FROM videos WHERE created_at < DATE_ADD(CURDATE(),INTERVAL -7 DAY) LIMIT 64

This works in phpmyadmin but with PHQL it not working

$weekvideos = $this->modelsManager->executeQuery("SELECT * FROM Videos WHERE created_at < DATE_ADD(CURDATE(),INTERVAL -7 DAY) LIMIT 64");
 $this->view->setVars(array('weekvideos' => $weekvideos));