Hi everybody,
Below is PHQL query:
$phql = "select ar.reply_id,ar.artid,ar.reply_time,ar.second_reply,ar.reply_content,a.artname,c.cname from articlereply as ar ";
$phql .= "left join ( article as a left join category as c on a.cid=c.cid ) on ar.artid=a.artid ";
$phql .= "where ar.reply_uid=:reply_uid: order by ar.reply_time desc";
$article_reply = $this->modelsManager->executeQuery($phql,array(
"reply_uid" => $reply_uid
));
i can use above sql running in mysql workbench,but cannot running in Phalcon,show below error:
PhalconException: Syntax error, unexpected token (, near to ' article as a left join category as c on a.cid=c.cid ) on ar.artid=a.artid where ar.reply_uid=:reply_uid: order by ar.reply_time desc', when parsing: select ar.reply_id,ar.artid,ar.reply_time,ar.second_reply,ar.reply_content,a.artname,c.cname from articlereply as ar left join ( article as a left join category as c on a.cid=c.cid ) on ar.artid=a.artid where ar.reply_uid=:reply_uid: order by ar.reply_time desc (261)