Exemple #1
0
 /**
  * Construtor.
  *
  * @param int         $tipo   Define o tipo a ser retornado
  * @param string      $tabela A tabela a ser inclusa na consulta
  * @param strin|Where $on     O teste do join
  */
 public function __construct($tipo = self::INNER_JOIN, $tabela = '', $on = '')
 {
     parent::__construct();
     $this->tabelas = array();
     $this->tipos = array(self::INNER => 'INNER', self::INNER_JOIN => 'INNER JOIN', self::LEFT_JOIN => 'LEFT JOIN', self::RIGHT_JOIN => 'RIGHT JOIN');
     $this->queryString = $this->inner($tipo);
 }
Exemple #2
0
 /**
  *
  * @param string|array $colunas As colunas para a ordenação
  * @param int $order A ordem a ser retornada
  * @param int $ordem A ordem a ser definida. O padrão é Order::ASC
  */
 public function __construct($colunas = false, $order = self::ASC)
 {
     parent::__construct();
     $this->order = array(self::ASC => "asc", self::DSC => "desc");
     if (is_string($colunas) || is_array($colunas)) {
         $this->order($colunas, $order);
     }
 }
Exemple #3
0
 public function __construct($where = array())
 {
     parent::__construct();
     $this->colunas = array();
     $this->testesLogicos = array(self::T_LT => "<", self::T_LE => "<=", self::T_EQ => "=", self::T_GE => ">=", self::T_GT => ">", self::T_NE => "!=", self::T_LK => "like");
     $this->uniao = array(self::U_AND => "and", self::U_OR => "or");
     //Caso seja definido no contrutor as definições dos teste
     if (count($where)) {
         $this->where($where);
     }
 }