https://github.com/leomaurodesenv/classes-dbms-php
This package connect and prepare queries for Database Management System
https://github.com/leomaurodesenv/classes-dbms-php
database database-management dbms mysqli pdo php sgbd
Last synced: 15 days ago
JSON representation
This package connect and prepare queries for Database Management System
- Host: GitHub
- URL: https://github.com/leomaurodesenv/classes-dbms-php
- Owner: leomaurodesenv
- License: mit
- Created: 2016-07-21T14:17:30.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2019-02-09T20:29:58.000Z (over 7 years ago)
- Last Synced: 2025-09-07T17:54:25.386Z (10 months ago)
- Topics: database, database-management, dbms, mysqli, pdo, php, sgbd
- Language: PHP
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Connection Instruction #
This package have classes to connection and queries for Database Management System (DBMS [or SGBD, in Portuguese]).
Currently it can connect to a database using MySQLi or PDO extension and execute several types of queries from parameters that define tables, fields, values and conditions.
#### Folder:
* /php/connection/MysqliInstruction.php `MysqliInstruction()`
* /php/connection/PDOInstruction.php `PDOInstruction()`
## Example
#### MysqliInstruction()
```php
/* Autoload Include */
use \Connection\MysqliInstruction;
$mysqli = new MysqliInstruction();
$mysqli->connect();
$resp = $mysqli->select('SELECT * FROM table WHERE id < ?', array('10'));
$resp = $mysqli->generic('DELETE FROM table WHERE id = ?', array('2'));
var_dump($resp);
$mysqli->end();
```
#### PDOInstruction()
```php
/* Autoload Include */
use \Connection\PDOInstruction;
$pdo = new PDOInstruction();
$pdo->connect();
$resp = $pdo->select('SELECT * FROM table WHERE id < ?', array('10'));
$resp = $pdo->generic('DELETE FROM table WHERE id = ?', array('2'));
var_dump($resp);
$pdo->end();
```
## Also look ~
- [License MIT](LICENSE)
- Create by Leonardo Mauro (leo.mauro.desenv@gmail.com)
- Git: [leomaurodesenv](https://github.com/leomaurodesenv/)
- Site: [Portfolio](http://leonardomauro.com/portfolio/)