->selectAdd() | ->escape() |
DB_DataObject | |
PEAR Manual | |
void $DB_DataObject->whereAdd (
string $where
,
string $logic
)
Adds items to the where part of a SQL query. Calling this without any arguments clears the where condition. The default behavior is to add 'AND' to the existing conditions, use the $logic parameter to append OR conditions.
string $cond - condition to add, or blank to reset the conditions
string $logic - optional logic "OR" (defaults to "AND")
This function can not be called statically.
The quote_identifiers configuration option will not affect data sent to whereAdd.
Using whereAdd()
|
Resulting SQL
SELECT * FROM person WHERE age > 12 AND age < 30 SELECT * FROM person WHERE age < 12 OR age > 30 |
->selectAdd() | ->escape() |
DB_DataObject | |
PEAR Manual | |