SimpleWhereClause SimpleWhereClause(
int
$field, string
$operator, mixed
$value, [string
$compare_type = DEFAULT_COMPARISON])
|
|
Creates a new
WhereClause object that does a comparison of a field and a value.
This will be the most commonly used type of WHERE clause. It can do comparisons of the sort "$tablerow[$field] operator $value" where 'operator' is one of:
- = (equals)
- != (not equals)
- > (greater than)
- < (less than)
- >= (greater than or equal to)
- <= (less than or equal to)
There are 3 pre-defined constants (STRING_COMPARISON, NUMERIC COMPARISON and INTEGER_COMPARISON) that modify the behaviour of these operators to do the comparison as strings, floats and integers respectively. Howevers, these constants are just the names of functions that do the comparison (the first being the builtin function
strcmp(), so you can supply your own function here to customise the behaviour of this class.
Parameters: