mirror of
https://gitlab.com/CodeSolutionsProject/DBWrapper.git
synced 2026-02-19 11:31:32 +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.
|
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
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user