https://github.com/duncan3dc/sql-class
A simple database abstraction layer for PHP, with an on disk caching facility.
https://github.com/duncan3dc/sql-class
mysql odbc php sql
Last synced: 2 months ago
JSON representation
A simple database abstraction layer for PHP, with an on disk caching facility.
- Host: GitHub
- URL: https://github.com/duncan3dc/sql-class
- Owner: duncan3dc
- License: apache-2.0
- Created: 2014-05-07T23:42:12.000Z (about 11 years ago)
- Default Branch: main
- Last Pushed: 2025-03-06T13:52:20.000Z (4 months ago)
- Last Synced: 2025-04-19T11:10:51.841Z (3 months ago)
- Topics: mysql, odbc, php, sql
- Language: PHP
- Homepage:
- Size: 1.2 MB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
sql-class
=========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/](http://duncan3dc.github.io/sql-class/api/namespaces/duncan3dc.SqlClass.html)[](https://github.com/duncan3dc/sql-class/actions/workflows/buildcheck.yml)
[](https://packagist.org/packages/duncan3dc/sql-class)Examples
--------The classes use a namespace of duncan3dc\SqlClass
```php
use duncan3dc\SqlClass\Sql;
```-------------------
```php
$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"],
])
```