System:Model:orderBy

From Aspen Documentation

Adds a sort order, optionally pulls from saved prefs.

Since 1.0

Arguments

void orderBy ([string $field = false], [string $dir = false], [string $sort_location = false])

field
Database table field name.
dir
Sort direction.
sort_location
A unique key to be used if saving sort preferences to database.

Returns

This function does not return any values.

Examples

Example:

$this->APP->model->orderBy('last_name', 'ASC');