예제 #1
0
파일: Join.php 프로젝트: kwn/quark
 /**
  * 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();
 }
예제 #2
0
파일: Builder.php 프로젝트: kwn/quark
 /**
  * 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();
 }