Exemplo n.º 1
0
    /**
     * 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);
    }
Exemplo n.º 2
0
 /**
  * Returns SQL query.
  * @return string
  */
 public final function __toString()
 {
     return $this->connection->sql($this->_export());
 }