Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 4 days 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 (over 10 years ago)
- Default Branch: main
- Last Pushed: 2023-10-18T13:27:36.000Z (about 1 year ago)
- Last Synced: 2024-11-01T12:16:02.364Z (12 days ago)
- Topics: mysql, odbc, php, sql
- Language: PHP
- Homepage:
- Size: 1.18 MB
- Stars: 4
- Watchers: 2
- 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)[![Build Status](https://github.com/duncan3dc/sql-class/workflows/.github/workflows/buildcheck.yml/badge.svg?branch=main)](https://github.com/duncan3dc/sql-class/actions/workflows/buildcheck.yml)
[![Latest Version](https://img.shields.io/packagist/v/duncan3dc/sql-class.svg)](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"],
])
```