IDBWhereHolder Interface Reference
[Interfaces]
Interface for things that have where clauses. More...
Public Member Functions |
|
| add_where ($column, $operator=null, $value=null, $mode= 'AND') | |
| Adds where to this. |
|
| add_where_object (IDBWhere $where) | |
| Adds IDBWhere instance
to this. |
|
| get_wheres () | |
| Returns root collection of wheres. |
|
Detailed Description
Interface for things that have where clauses.
Definition at line 8 of file idbwhereholder.cls.php.
Member Function Documentation
| IDBWhereHolder::add_where | ( | $ | column, | |
| $ | operator = null, |
|||
| $ | value = null, |
|||
| $ | mode = 'AND' |
|||
| ) |
Adds where to this.
Example:
$object = new mytable(); $object->add_where('id', '>', 3); $object->add_where('name', 'in', array('Hans', 'Joe')); $object->add_where("(email like '%provider1%' or email like '%provider2%')");
Will query using the following SQL:
SELECT * FROM mytable WHERE (id > 3 AND name IN ('Hans', 'Joe') AND (email like 'provider1' or email like 'provider2'));
- Parameters:
-
string $column Column to query upon, or a full sql where statement string $operator Operator to execute mixed $value Value(s) to use string Either IDBWhere::OP_AND or DBWhere::OP_OR
Implemented in DataObjectBase, DBQuery, and DBWhereGroup.
| IDBWhereHolder::add_where_object | ( | IDBWhere $ | where | ) |
Adds IDBWhere instance to this.
Implemented in DataObjectBase, DBQuery, and DBWhereGroup.
| IDBWhereHolder::get_wheres | ( | ) |
Returns root collection of wheres.
- Returns:
- DBWhereGroup
Implemented in DataObjectBase, DBQuery, DBWhereGroup, and DBQuerySelect.
The documentation for this interface was generated from the following file:
- gyro/core/lib/interfaces/idbwhereholder.cls.php
