1 # pq\Query\Writer pq\Query\Writer::criteria(array $criteria)
3 Write nested AND/OR criteria to the query string.
5 The criteria can either be a simple accociative array, where the keys build the left hand operand plus the operator and the values make up the right hand operand and will be passed to pq\Query\Writer::param(). All concatenated together by AND clauses.
7 Using multiple arrays, the above logic will be applied to each array and then concatenated by OR clauses.
12 Nested AND/OR criteria.
16 * pq\Query\Writer, self.
24 $q = new Query\Writer;
25 $q->write("select * from account where")
27 ["id >" => 1, "id <" => 5],
31 var_dump((string) $q, $q->getParams());
37 string(84) "select * from account where ( ( ( id > $1 ) AND ( id < $2 ) ) OR ( ( name = $3 ) ) )"