mmantai / query-builder
A simple method based query builder
v0.0.3
2023-12-22 10:01 UTC
Requires (Dev)
- phpunit/phpunit: ^10.3
This package is auto-updated.
Last update: 2024-10-13 17:03:00 UTC
README
This package provides classes to create sql queries for different databases
Supported
- MySQL
- PostgreSQL
Planned
- SQLite
Examples
Mysql
<?php if(file_exists(__DIR__ . '/vendor/autoload.php')) { require_once __DIR__ . '/vendor/autoload.php'; } use M2\QueryBuilder\MySQLQueryBuilder; $builder = new MySQLQueryBuilder(); $query = $builder->selectAll()->from("customer", "c")->where("rowid", ">=", "12345"); // query: SELECT * FROM customer AS c WHERE rowid >= 12345