nafisc/mysqli-wrapper

A simple ORM for MySql and PHP

v1.9.2 2019-11-02 02:14 UTC

This package is auto-updated.

Last update: 2024-10-29 04:20:13 UTC


README

A simple ORM for MySql and PHP.

composer require nafisc/mysqli-wrapper

StyleCI Latest Stable Version Total Downloads Latest Unstable Version License

How to use?

See the documentation for information on how to use MySqli Wrapper!

Quick Example

    use \MySqliWrapper\Database as DB;

    DB::register(
        [
            'name'     => 'main', 
            'host'     => 'localhost',
            'username' => 'root',
            'password' => 'password',
            'database' => 'database',
            'port'     => 3306,
            'charset'  => 'utf8',
        ]
    );

    $user = DB::get('main')
            ->table('users')
            ->where('name', '=', 'Nathan')
            ->first();

    $user->age = 10;
    $user->save();