$phql = "SELECT * FROM ModelName WHERE u_id=0 AND a_id=?0";
$this->modelsManager->executeQuery($phql, [
$a_id,
]);
This simple query always produces following error:
The argument is not initialized or iterable()
#0 [internal function]: Phalcon\Mvc\Model\Query->_executeSelect(Array, Array, NULL)
#1 [internal function]: Phalcon\Mvc\Model\Query->execute()
#2 Phalcon\Mvc\Model\Manager->executeQuery('SELECT * FROM M...', Array)
I also tried Models::find() , Models::findFirst() and Models::count(), same error occur.
I've checked $a_id is not null,but an integer.
When I do an insert query, no error happened!