mirror of
https://gitlab.com/CodeSolutionsProject/DBWrapper.git
synced 2026-02-16 01:51:33 +01:00
Update README.md
This commit is contained in:
10
README.md
10
README.md
@@ -4,16 +4,21 @@ This script is a simple wrapper for SQLite3, MySQL and PgSQL, for make possible
|
||||
|
||||
## Avalible functions:
|
||||
* To connect
|
||||
|
||||
```php
|
||||
//$server is location in SQLite3
|
||||
resource dbw_connect (string $tdb,string $server[,string $database, string $user,string $password]);
|
||||
```
|
||||
|
||||
* To close
|
||||
|
||||
```php
|
||||
//Closes connection
|
||||
bool dbw_close (resource $conn);
|
||||
```
|
||||
|
||||
* Queries
|
||||
|
||||
```php
|
||||
//Does a query
|
||||
mixed dbw_query (resource $conn, string $query);
|
||||
@@ -24,7 +29,9 @@ array dbw_fetch_array (resource $conn,resource $result[, string $typearray]);
|
||||
//This do a query and fetch array, all in one function($typearray optional, see below)
|
||||
array dbw_query_fetch_array (resource $conn,string $query[, string $typearray]);
|
||||
```
|
||||
|
||||
* Using result of a query
|
||||
|
||||
```php
|
||||
//Wrappers of dbw_fetch_array with row or assoc arguments
|
||||
array dbw_fetch_row(resource $conn,resource $result);
|
||||
@@ -34,7 +41,9 @@ bool array dbw_query_goto(resource $conn,resource $result[,int $row]) ;
|
||||
//Return number of results of a query
|
||||
int dbw_num_rows(resource $conn, resource $result);
|
||||
```
|
||||
|
||||
* Without a query
|
||||
|
||||
```php
|
||||
// Escapes conflictive chars for inserting into database
|
||||
string dbw_escape_string(resource $conn,string $string);
|
||||
@@ -43,6 +52,7 @@ int dbw_last_id(resource $conn);
|
||||
//Alias of dbw_last_id
|
||||
int dbw_insert_id(resource $conn);
|
||||
```
|
||||
|
||||
* Important details
|
||||
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user