Commit 1f7b99ea authored by Alexander Butenko's avatar Alexander Butenko

Added installation via composer into readme

parent 46f93bfb
...@@ -19,17 +19,29 @@ MysqliDb -- Simple MySQLi wrapper with prepared statements ...@@ -19,17 +19,29 @@ MysqliDb -- Simple MySQLi wrapper with prepared statements
**[Helper Functions](#helper-commands)** **[Helper Functions](#helper-commands)**
**[Transaction Helpers](#transaction-helpers)** **[Transaction Helpers](#transaction-helpers)**
### Initialization ### Installation
To utilize this class, first import MysqliDb.php into your project, and require it. To utilize this class, first import MysqliDb.php into your project, and require it.
```php ```php
require_once ('MysqliDb.php'); require_once ('MysqliDb.php');
``` ```
### Installation with composer
It is also possible to install library via composer
```
composer require joshcam/mysqli-database-class:dev-master
```
### Initialization
Simple initialization with utf8 charset by default: Simple initialization with utf8 charset by default:
```php ```php
$db = new MysqliDb ('host', 'username', 'password', 'databaseName'); $db = new MysqliDb ('host', 'username', 'password', 'databaseName');
``` ```
Or in case usage of the namespaces:
```php
$db = new \MysqliDb ('host', 'username', 'password', 'databaseName');
```
Advanced initialization. If no charset should be set charset, set it to null Advanced initialization. If no charset should be set charset, set it to null
```php ```php
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment