Hi!
I am pretty new in cphalcon. I do have a question concerning raw sql. I want to use INDEX BY but it is not working.
$sql = ' SELECT *'
. ' FROM Two'
. ' INNER JOIN One ON One.id= Two.pic_id '
. ' INDEX BY One.id '
. ' WHERE One.category_id IN (1,2,3,4,...) '
. ' ORDER BY RAND() ';
$query = $this->di->get('modelsManager')->createQuery($sql);
$result_query = $query->execute()>setHydrateMode(Resultset::HYDRATE_ARRAYS);
The error comes up "Syntax error, unexpected token IDENTIFIER(INDEX)" - in symfony it is working.
One.id is Autoincrement and unsigend integer!
I migrate from symfony to the wonderful and beautiful phalcon. I am new in phalcon. If it is double sorry!
UPDATE: MySql