Download the PHP package co0lc0der/simple-query-builder without Composer
On this page you can find all versions of the php package co0lc0der/simple-query-builder. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download co0lc0der/simple-query-builder
More information about co0lc0der/simple-query-builder
Files in co0lc0der/simple-query-builder
Package simple-query-builder
Short Description A small easy-to-use php component for working with a database by PDO. It provides some public methods to manipulate data. Each SQL query is prepared and safe.
License MIT
Informations about the package simple-query-builder
QueryBuilder php component
This is a small easy-to-use PHP component for working with a database by PDO. It provides some public methods to compose SQL queries and manipulate data. Each SQL query is prepared and safe. QueryBuilder fetches data to arrays by default. At present time the component supports MySQL and SQLite (file or memory).
PAY ATTENTION! v0.2 and v0.3+ are incompatible.
Contributing
Bug reports and/or pull requests are welcome
License
The package is available as open source under the terms of the MIT license
Installation
The preferred way to install this extension is through composer.
Either run
or add
to the require section
of your composer.json
file.
How to use
Edit config.php
and set the parameters up. Choose DB driver, DB name etc
Use composer autoloader
Init QueryBuilder
with Connection::make()
Usage examples
Select all rows from a table
Result query
Select rows with two conditions
Result query
Update a row
Result query
More examples you can find in documentation or tests.
ToDo
I'm going to add the next features into future versions
- write more unit testes
- add subqueries for QueryBuilder
- add
BETWEEN
- add
WHERE EXISTS
- add TableBuilder class (for beginning
CREATE TABLE
, move$query->drop()
and$query->truncate()
into it) - add PostgreSQL support
- add
WITH
- and probably something more
All versions of simple-query-builder with dependencies
ext-pdo Version *
ext-fileinfo Version *
ext-intl Version *
ext-json Version *
ext-mbstring Version *