Mvc\Model\Query\Builder::innerJoin

public Phalcon\Mvc\Model\Query\Builder innerJoin (string $model, [string $conditions], [string $alias])

Adds an INNER join to the query

// Inner Join model 'Robots' with automatic conditions and alias
$builder->innerJoin('Robots');

  // Inner Join model 'Robots' specifing conditions
$builder->innerJoin('Robots', 'Robots.id = RobotsParts.robots_id');

  // Inner Join model 'Robots' specifing conditions and alias
$builder->innerJoin('Robots', 'r.id = RobotsParts.robots_id', 'r');
doc_Phalcon
2016-10-16 09:54:31
Comments
Leave a Comment

Please login to continue.