https://github.com/oops-org-php/edb
PHP Extended DB Abstraction Layer
https://github.com/oops-org-php/edb
Last synced: 10 months ago
JSON representation
PHP Extended DB Abstraction Layer
- Host: GitHub
- URL: https://github.com/oops-org-php/edb
- Owner: OOPS-ORG-PHP
- Created: 2016-05-22T15:28:47.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-02-16T05:41:25.000Z (almost 8 years ago)
- Last Synced: 2025-01-08T10:39:12.722Z (11 months ago)
- Language: PHP
- Homepage: http://pear.oops.org
- Size: 146 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PHP EDB(Extended DB) Class API
# Abstract
The EDB package provides abstraction layers for various DBs. The features of EDB package are as follows:
1. Support DBs
1. MySQL (require MySQL extension)
2. MySQLi (require MySQLi extension)
3. SQLite2 (require sqlite2 extension)
4. SQLite3 (require sqlite3 extension)
5. PostgreSQL (require pgsql extension)
6. MSSQL (require mssql extension)
7. SQL Relay (require sqlrelay extension)
2. Simple and easy to use
3. Support bind query. If the DB API does not provide a bind query, it checks only the types of the binded variables.
# Reference
http://pear.oops.org/docs/EDB/EDB_Common/EDB.html
# Installation
use pear system
```sh
[root@host ~]$ pear channel-discover pear.oops.org
[root@host ~]$ pear install oops/EDB
[root@host ~]$ pear list -a
```
# Requires
1. PHP [myException](https://github.com/OOPS-ORG-PHP/myException) class
```sh
[root@host ~]$ pear install oops/myException
```
# Examples:
See also https://github.com/OOPS-ORG-PHP/EDB/tree/master/tests
```php
set_charset ('utf8'); // only mysql (SET NAMES utf8;)
$rno = $db->query ('SELECT * FROM edb_test WHERE num > ?', 'i', 0);
$r = $db->fetch_all ();
$db->free_result ();
print_r ($r);
} catch ( myException $e ) {
fprintf (STDERR, "%s\n", $e->Message ());
#print_r ($e);
#print_r ($e->Trace ());
#echo $e->TraceAsString () . "\n";
print_r ($e->TraceAsArray ()) . "\n";
$e->finalize ();
}
?>
```