OrderBy OrderBy(
int
$field, int
$orderType, [int
$compareAs = DEFAULT_COMPARISON])
Creates a new OrderBy structure
The $compareAs parameter can be supplied using one of the pre-defined constants, but this is actually implemented by defining the constants as names of functions to do the comparison. You can therefore supply the name of any function that works like strcmp() to implement custom ordering.
Parameters:
int
$field
The index of the field to order by
int
$orderType
ASCENDING or DESCENDING
int
$compareAs
Comparison type: DEFAULT_COMPARISON, STRING_COMPARISON, INTEGER_COMPARISION, or NUMERIC_COMPARISON, or the name of a user defined function that you want to use for doing the comparison.