Skip to content

Latest commit

 

History

History
48 lines (39 loc) · 1.26 KB

File metadata and controls

48 lines (39 loc) · 1.26 KB

Requirements

TODO

List some todos...

Examples

$q->table('test')
->column('test_2', 'test')
->table('test_3', 'test_2');
//=> SELECT test_2 as test FROM test, test_3 AS test_2

$q->table('table')
->begin_and()
->and_where('col_1', 1)
->or_where('col_2', 2)
->end_and()
->or_where('col_3', 3, '!=');
//=>SELECT * FROM table WHERE ( col_1 = '1'  OR col_2 = '2' ) or col_3 != '3'

$q->table('table')
->begin_and()
->begin_and(false)      // false so we don't add and before opening bracket
->and_where('col_1', 1)
->or_where('col_2', 2)
->end_and()
->end_and()
->or_where('col_3', 3, '!=');

//=>SELECT * FROM table WHERE ( ( col_1 = '1' OR col_2 = '2' ) ) OR col_3 != '3'