Mvc\Model\Query\Builder::getGroupBy

public string getGroupBy () Returns the GROUP BY clause

Mvc\Model\Query\Builder::getDistinct

public getDistinct () Returns SELECT DISTINCT / SELECT ALL flag

Mvc\Model\Query\Builder::from

public from (mixed $models) Sets the models who makes part of the query $builder->from('Robots'); $builder->from(array('Robots', 'RobotsParts')); $builder->from(array('r' => 'Robots', 'rp' => 'RobotsParts'));

Mvc\Model\Query\Builder::getDI

public getDI () Returns the DependencyInjector container

Mvc\Model\Query\Builder::forUpdate

public forUpdate (mixed $forUpdate) Sets a FOR UPDATE clause $builder->forUpdate(true);

Mvc\Model\Query\Builder::getFrom

public string | array getFrom () Return the models who makes part of the query

Mvc\Model\Query\Builder::andWhere

public Phalcon\Mvc\Model\Query\Builder andWhere (string $conditions, [array $bindParams], [array $bindTypes]) Appends a condition to the current conditions using a AND operator $builder->andWhere('name = "Peter"'); $builder->andWhere('name = :name: AND id > :id:', array('name' => 'Peter', 'id' => 100));

Mvc\Model\Query\Builder::addFrom

public addFrom (mixed $model, [mixed $alias], [mixed $with]) Add a model to take part of the query // Load data from models Robots $builder->addFrom('Robots'); // Load data from model 'Robots' using 'r' as alias in PHQL $builder->addFrom('Robots', 'r'); // Load data from model 'Robots' using 'r' as alias in PHQL // and eager load model 'RobotsParts' $builder->addFrom('Robots', 'r', 'RobotsParts'); // Load data from model 'Robots' using 'r' as alias in PHQL // and eager loa

Mvc\Model\Query\Builder::columns

public columns (mixed $columns) Sets the columns to be queried $builder->columns("id, name"); $builder->columns(array('id', 'name')); $builder->columns(array('name', 'number' => 'COUNT(*)'));

Mvc\Model\Query\Builder

implements Phalcon\Mvc\Model\Query\BuilderInterface, Phalcon\Di\InjectionAwareInterface Source on GitHub Helps to create PHQL queries using an OO interface $params = array( 'models' => array('Users'), 'columns' => array('id', 'name', 'status'), 'conditions' => array( array( "created > :min: AND created < :max:", array("min" => '2013-01-01', 'max' => '2014-01-01'), array("min" => PDO::PARAM_STR, 'max' =>