Exemple #1
0
 /**
  * Creates a new JOIN statement for a table. Optionally, the type of JOIN
  * can be specified as the second parameter.
  *
  * @param  mixed   $table  column name or array($column, $alias) or object
  * @param  string  $type   type of JOIN: INNER, RIGHT, LEFT, etc
  */
 public function __construct($table, $type = null)
 {
     $this->type = null;
     $this->table = $table;
     $this->on = array();
     $this->using = array();
     if (null !== $type) {
         $this->type = (string) $type;
     }
     $this->quoter = Quoter::instance();
 }
Exemple #2
0
 /**
  * Creates a new SQL query of the specified type.
  *
  * @param   string   $sql   query string
  */
 public function __construct($sql)
 {
     $this->sql = $sql;
     $this->quoter = Quoter::instance();
 }