flatfile
[ class tree: flatfile ] [ index: flatfile ] [ all elements ]

Class: OrderBy

Source Location: /flatfile.php

Class Overview


Stores information about an ORDER BY clause


Variables

Methods



Class Details

[line 715]
Stores information about an ORDER BY clause

Can be passed to selectWhere to order the output. It is easiest to use the constructor to set the fields, rather than setting each individually




[ Top ]


Class Variables

$compareAs =

[line 721]



Tags:

var:  Comparison type - usually either DEFAULT_COMPARISON, STRING_COMPARISON, INTEGER_COMPARISION, or NUMERIC_COMPARISON

Type:   string


[ Top ]

$field =

[line 717]



Tags:

var:  Index of field to order by

Type:   int


[ Top ]

$orderType =

[line 719]



Tags:

var:  Order type - ASCENDING or DESCENDING

Type:   int


[ Top ]



Class Methods


constructor OrderBy [line 734]

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.

[ Top ]


Documentation generated on Sun, 25 Oct 2009 22:30:47 +0000 by phpDocumentor 1.4.3