duncan3dc / sql-class
A simple database abstraction layer, with an on disk caching facility.
1.9.3
2025-03-06 13:50 UTC
Requires
- php: ^7.2 || ^8.0
Requires (Dev)
- duncan3dc/object-intruder: ^0.3 || ^1.0
- mockery/mockery: ^1.3
- phpunit/phpunit: ^8.5.29
This package is auto-updated.
Last update: 2026-06-12 13:19:52 UTC
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/
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"], ])