Class DBExample
This class is used to construct SQL WHERE expressions from arrays. This can be useful to build simple conditions without writing SQL query and manage binding values This class is used in classes Model, Form, ItemList to get data from the database. Example : To make the expression 'field1 = "value1" AND (field2 IS NOT NULL OR field3 < 12)', create an DBExample like :
new DBExample(array( array('field1' => "value1"), array('$or' => array( array( 'field2' => '$notnull' ), array( 'field3' => array('$lt' => 12) ) )) ))
Methods summary
public
|
|
public static
string
|
|
public
string
|