https://github.com/isc30/emysqli
Extended Mysqli class that allows calling PROCEDURES, FUNCTIONS and VIEWS
https://github.com/isc30/emysqli
Last synced: about 1 year ago
JSON representation
Extended Mysqli class that allows calling PROCEDURES, FUNCTIONS and VIEWS
- Host: GitHub
- URL: https://github.com/isc30/emysqli
- Owner: isc30
- Created: 2015-08-05T14:27:11.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-09-15T06:13:35.000Z (almost 11 years ago)
- Last Synced: 2025-03-11T12:52:19.291Z (over 1 year ago)
- Language: PHP
- Homepage:
- Size: 180 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Extended Mysqli (eMysqli)
Extended Mysqli class that allows calling PROCEDURES, FUNCTIONS and VIEWS
By: isc30 -> ivansanzcarasa@gmail.com / https://github.com/isc30
##Getting eMysqli object:
```php
$eMysqli = new eMysqli($host, $username, $password, $database);
or
$eMysqli = getMysqlConnection();
```
##Calling a procedure:
```php
$eMysqli->callProcedure( 'PROCEDURE_NAME*', [INPUT], [OUTPUT] );
```
> **Example:**
```php
$result = $eMysqli->callProcedure('prTestLogin', [$email, $password], ['@ok', '@userId']);
$result => Array (
[pr] => ( )
[out] => ( [@ok] => true, [@userId] => 23142 )
)
```
##Calling a function:
```php
$eMysqli->callFunction( 'FUNCTION_NAME*', [INPUT] );
```
> **Example:**
```php
$result = $eMysqli->callFunction('fuGetSum', [26, 57]);
$result => 83
```
##Calling a view:
```php
$eMysqli->callView( 'VIEW_NAME*' );
```
> **Example:**
```php
$result = $eMysqli->callView('viShowUsers');
$result => Array (
[0] => (
[id] => 1,
[username] => 'Paco'
)
[1] => (
[id] => 2,
[username] => 'Juan'
)
)
##Version history
###v1.1.0
* Changed procedure call method when it returns 2 or more SELECTs
###v1.0.1
* Fix some bugs
###v1.0.0
* Procedure support
* Function support
* View support