PHP Trait Bluz\Db\Query\Traits\Order

Required for: - Select Builder - Update Builder - Delete Builder
Author: Anton Shevchuk
Show file Open project: bluzphp/framework

Public Methods

Method Description
addOrderBy ( string $sort, string $order = 'ASC' ) Adds an ordering to the query results
orderBy ( string $sort, string $order = 'ASC' ) Specifies an ordering for the query results Replaces any previously specified orderings, if any

Method Details

addOrderBy() public method

Adds an ordering to the query results
public addOrderBy ( string $sort, string $order = 'ASC' )
$sort string Sort expression
$order string Sort direction (ASC or DESC)

orderBy() public method

Specifies an ordering for the query results Replaces any previously specified orderings, if any
public orderBy ( string $sort, string $order = 'ASC' )
$sort string Sort expression
$order string Sort direction (ASC or DESC)