src/ORM/DataQuery.php
public function sort($sort = null, $direction = null, $clear = true)
    {
        if ($clear) {
            $this->query->setOrderBy($sort, $direction);
        } else {
            $this->query->addOrderBy($sort, $direction);
        }

        return $this;
    }
public function sort($sort = null, $direction = null, $clear = true)
    {
        if ($clear) {
            $this->query->setOrderBy($sort, $direction);
        } else {
            $this->query->addOrderBy($sort, $direction);
        }

        return $this;
    }
public function sort ( $ sort = null , $ direction = null , $ clear = true ) { if ( $ clear ) { $ this -> query -> setOrderBy ( $ sort , $ direction ) ; } else { $ this -> query -> addOrderBy ( $ sort , $ direction ) ; } return $ this ; }
Set the ORDER BY clause of this query

@see SQLSelect::orderby()

@param string $sort Column to sort on (escaped SQL statement)
@param string $direction Direction ("ASC" or "DESC", escaped SQL statement)
@param bool $clear Clear existing values
@return $this
Set the ORDER BY clause of this query