mirror of
https://gitlab.com/CodeSolutionsProject/DBWrapper.git
synced 2026-02-15 01:21:34 +01:00
1.5.1
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -6,7 +6,7 @@ This script is a simple wrapper for SQLite3, MySQL and PgSQL, for make possible
|
||||
|
||||
In composer:
|
||||
```bash
|
||||
composer require jkanetwork/dbwrapper "~1.5.0"
|
||||
composer require jkanetwork/dbwrapper "~1.5.1"
|
||||
```
|
||||
|
||||
By hand: Download the php file inside src folder
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
/** Connect with database */
|
||||
function dbw_connect($tdb,$server,$database=NULL,$user = NULL,$password=NULL){
|
||||
$return = null;
|
||||
switch ($tdb){
|
||||
case "mysql":
|
||||
case "mysqli":
|
||||
@@ -54,6 +55,7 @@ function dbw_escape_string($conn,$string){
|
||||
/** Make query */
|
||||
function dbw_query($conn,$query){
|
||||
$time = microtime(true);
|
||||
$ret = null;
|
||||
switch ($conn[1]){
|
||||
case "mysqli":
|
||||
$ret = mysqli_query($conn[0],$query);
|
||||
@@ -94,7 +96,7 @@ function dbw_fetch_array($conn,$result,$typearray = NULL){
|
||||
/** Make query and fetch array */
|
||||
function dbw_query_fetch_array($conn,$query){
|
||||
$time = microtime(true);
|
||||
|
||||
$ret=null;
|
||||
switch ($conn[1]){
|
||||
case "mysqli":
|
||||
$result = mysqli_query($conn[0],$query);
|
||||
|
||||
Reference in New Issue
Block a user