Joins

How can I set the type of JOIN (ex. left or right)?



94.8k
$result = $this->modelsManager->query("SELECT * FROM Robots LEFT JOIN RobotsParts");

Got "Fatal error: Call to undefined method Phalcon\Mvc\Model\Manager::query()"



94.8k

Sorry, it must be:

$result = $this->modelsManager->executeQuery("SELECT * FROM Robots LEFT JOIN RobotsParts");

http://docs.phalcon.io/en/1.0.0/reference/phql.html#joins http://docs.phalcon.io/en/1.0.0/reference/phql.html#creating-queries-using-the-query-builder