text() public method

we now return full WhereClause object here and evaluate it in preparseQueryParams
public text ( )
Ejemplo n.º 1
0
 function test_3_negate_last()
 {
     $where = new WhereClause('and');
     $where->add('password=%s', 'hello');
     $subclause = $where->addClause('or');
     $subclause->add('username!=%s', 'Bart');
     $subclause->negateLast();
     $result = DB::query("SELECT * FROM accounts WHERE %l", $where->text());
     $this->assert(count($result) === 1);
     $this->assert($result[0]['age'] === '15');
 }