indgy/phluent

A dependency free lightweight fluent SQL query builder using PDO

0.9.2 2021-02-26 16:16 UTC

This package is auto-updated.

Last update: 2024-10-29 06:12:29 UTC


README

Build Status Coverage Status

A dependency free lightweight fluent SQL query builder using PDO similar to Eloquent, allows you to query your database fluently:

$query->select('title, year')
    ->from('movies')
    ->where(function($query) {
        $query->where('title', 'like' ,'A %');
        $query->orWhere('title', 'like' ,'The %');
    })
    ->orderBy('year');

Install

Phluent can be used as a composer package or a single file download and included() into your project.

Via Composer

$ composer require indgy/phluent

As a standalone file

cp dist/Phluent.php /path/to/your/project

Then require it where needed in your project

require("/path/to/your/project/Phluent.php");

Usage

See the documentation for details.

Change log

Please see CHANGELOG for more information on what has changed recently.

Testing

$ make test

Contributing

Please see CONTRIBUTING and CODE_OF_CONDUCT for details.

Security

If you discover any security related issues, please email me@indgy.uk instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.