Skip to content

php sql query builder

License

GPL-2.0, MIT licenses found

Licenses found

GPL-2.0
GPL-LICENSE.txt
MIT
MIT-LICENSE.txt
Notifications You must be signed in to change notification settings

desm-it/query-builder

 
 

Repository files navigation

Build Status Code coverage

Requirements

  • PHP 5.3 +

TODO

  • PHP 5.2 branch

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()
->andWhere('col_1', 1)
->orWhere('col_2', 2)
->endAnd()
->orWhere('col_3', 3, '!=');
//=>SELECT * FROM table WHERE ( col_1 = '1'  OR col_2 = '2' ) or col_3 != '3'

$q->table('table')
->beginAnd()
->beginAnd()
->andWhere('col_1', 1)
->orWhere('col_2', 2)
->endAnd()
->endAnd()
->orWhere('col_3', 3, '!=');

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

About

php sql query builder

Resources

License

GPL-2.0, MIT licenses found

Licenses found

GPL-2.0
GPL-LICENSE.txt
MIT
MIT-LICENSE.txt

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%