Exemplo n.º 1
0
 /**
  * Compiles the select statement based on the other functions called and returns the query string.
  *
  * @param   string  table name
  * @param   string  limit clause
  * @param   string  offset clause
  * @return  string  sql string
  */
 public function compile($table = '', $limit = NULL, $offset = NULL)
 {
     if ($table != '') {
         $this->from($table);
     }
     if (!is_null($limit)) {
         $this->limit($limit, $offset);
     }
     $sql = $this->_driver->select(get_object_vars($this));
     $this->reset();
     return $sql;
 }