Example #1
0
File: Delete.php Project: kwn/quark
 /**
  * Set the table for a delete.
  *
  * @param   string  $table  table name or array($table, $alias) or object
  */
 public function __construct($table = null)
 {
     $this->table = null;
     $this->where = array();
     $this->orderBy = array();
     $this->limit = null;
     if (null !== $table) {
         $this->table($table);
     }
     return parent::__construct('');
 }
Example #2
0
File: Select.php Project: kwn/quark
 /**
  * Sets the initial columns to select from.
  *
  * @param   array  $columns  column list
  */
 public function __construct(array $columns = null)
 {
     $this->select = array();
     $this->distinct = false;
     $this->from = array();
     $this->join = array();
     $this->groupBy = array();
     $this->having = array();
     $this->offset = null;
     $this->union = array();
     $this->lastJoin = null;
     $this->where = array();
     $this->orderBy = array();
     $this->limit = null;
     if (!empty($columns)) {
         $this->select = $columns;
     }
     parent::__construct('');
 }