/** * Returns SQL query. * @return string */ public final function __toString() { return $this->connection->sql(' SELECT %n', empty($this->cols) ? '*' : $this->cols, ' FROM %SQL', $this->sql, ' %ex', $this->conds ? array('WHERE %and', $this->conds) : NULL, ' %ex', $this->sorting ? array('ORDER BY %by', $this->sorting) : NULL, ' %ofs %lmt', $this->offset, $this->limit); }
/** * Returns SQL query. * @return string */ public final function __toString() { return $this->connection->sql($this->_export()); }