This commit is contained in:
joselucross
2018-05-16 15:47:31 +02:00
parent d366ae0f1f
commit 6d1e6d6fd7
2 changed files with 5 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
# DBWrapper - Version 1.5.0 # DBWrapper - Version 1.5.1
This script is a simple wrapper for SQLite3, MySQL and PgSQL, for make possible to use different BD systems without changing the functions. This script is a simple wrapper for SQLite3, MySQL and PgSQL, for make possible to use different BD systems without changing the functions.
@@ -6,7 +6,7 @@ This script is a simple wrapper for SQLite3, MySQL and PgSQL, for make possible
In composer: In composer:
```bash ```bash
composer require jkanetwork/dbwrapper "~1.5.0" composer require jkanetwork/dbwrapper "~1.5.1"
``` ```
By hand: Download the php file inside src folder By hand: Download the php file inside src folder

View File

@@ -9,6 +9,7 @@
/** Connect with database */ /** Connect with database */
function dbw_connect($tdb,$server,$database=NULL,$user = NULL,$password=NULL){ function dbw_connect($tdb,$server,$database=NULL,$user = NULL,$password=NULL){
$return = null;
switch ($tdb){ switch ($tdb){
case "mysql": case "mysql":
case "mysqli": case "mysqli":
@@ -54,6 +55,7 @@ function dbw_escape_string($conn,$string){
/** Make query */ /** Make query */
function dbw_query($conn,$query){ function dbw_query($conn,$query){
$time = microtime(true); $time = microtime(true);
$ret = null;
switch ($conn[1]){ switch ($conn[1]){
case "mysqli": case "mysqli":
$ret = mysqli_query($conn[0],$query); $ret = mysqli_query($conn[0],$query);
@@ -94,7 +96,7 @@ function dbw_fetch_array($conn,$result,$typearray = NULL){
/** Make query and fetch array */ /** Make query and fetch array */
function dbw_query_fetch_array($conn,$query){ function dbw_query_fetch_array($conn,$query){
$time = microtime(true); $time = microtime(true);
$ret=null;
switch ($conn[1]){ switch ($conn[1]){
case "mysqli": case "mysqli":
$result = mysqli_query($conn[0],$query); $result = mysqli_query($conn[0],$query);