duncan3dc/sql-class

A simple database abstraction layer, with an on disk caching facility.

Installs: 11 272

Dependents: 1

Stars: 1

Watchers: 1

Forks: 2

Language: PHP


README

A simple database abstraction layer, with an on disk caching facility.

Full documentation is available at http://duncan3dc.github.io/sql-class/
PHPDoc API documentation is also available at http://duncan3dc.github.io/sql-class/api/

Build Status Latest Version

Examples

The classes use a namespace of duncan3dc\SqlClass

use duncan3dc\SqlClass\Sql;
$sql = new Sql([
    "mode"      =>  "mysql",
    "hostname"  =>  "localhost",
    "username"  =>  "root",
    "password"  =>  "password",
]);

$row = $sql->select("table_1",[
    "field1"    =>  "one",
    "field2"    =>  "two",
]);

$sql->update("table_1",[
    "field3"    =>  "three",
],[
    "field1"    =>  $row["field1"],
    "field2"    =>  $row["field2"],
])