/** * Optionally sets the table name and initializes the internal class * properties. * * @param string $table The name of the table */ public function __construct($table = null) { $this->where = new \Peyote\Where(); $this->order_by = new \Peyote\Order(); $this->limit = new \Peyote\Limit(); parent::__construct($table); }
/** * Optionally sets the table name and initializes the internal class * properties. * * @param string $table The name of the table */ public function __construct($table = null) { $this->join = new \Peyote\Join(); $this->where = new \Peyote\Where(); $this->group_by = new \Peyote\Group(); $this->order_by = new \Peyote\Order(); $this->limit = new \Peyote\Limit(); $this->having = new \Peyote\Having(); parent::__construct($table); }
/** * Run a Peyote based query. * * @param \Peyote\Query $query A Peyote Query * @return \PDOStatement */ public function runQuery(\Peyote\Query $query) { return $this->run($query->compile(), $query->getParams()); }