Commit a204875d authored by Alexander Butenko's avatar Alexander Butenko

Couple typo fixed in readme

parent 1f7b99ea
...@@ -45,7 +45,7 @@ $db = new \MysqliDb ('host', 'username', 'password', 'databaseName'); ...@@ -45,7 +45,7 @@ $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
$db = new Mysqlidb (Array ( $db = new MysqliDb (Array (
'host' => 'host', 'host' => 'host',
'username' => 'username', 'username' => 'username',
'password' => 'password', 'password' => 'password',
...@@ -58,7 +58,7 @@ port and charset params are optional. ...@@ -58,7 +58,7 @@ port and charset params are optional.
Reuse already connected mysqli: Reuse already connected mysqli:
```php ```php
$mysqli = new mysqli ('host', 'username', 'password', 'databaseName'); $mysqli = new mysqli ('host', 'username', 'password', 'databaseName');
$db = new Mysqlidb ($mysqli); $db = new MysqliDb ($mysqli);
``` ```
Its also possible to set a table prefix: Its also possible to set a table prefix:
...@@ -74,15 +74,15 @@ Simple example ...@@ -74,15 +74,15 @@ Simple example
$data = Array ("login" => "admin", $data = Array ("login" => "admin",
"firstName" => "John", "firstName" => "John",
"lastName" => 'Doe' "lastName" => 'Doe'
) );
$id = $db->insert('users', $data); $id = $db->insert ('users', $data);
if($id) if($id)
echo 'user was created. Id='.$id; echo 'user was created. Id=' . $id;
``` ```
Insert with functions use Insert with functions use
```php ```php
$data = Array( $data = Array (
'login' => 'admin', 'login' => 'admin',
'active' => true, 'active' => true,
'firstName' => 'John', 'firstName' => 'John',
...@@ -151,7 +151,7 @@ $stats = $db->getOne ("users", "sum(id), count(*) as cnt"); ...@@ -151,7 +151,7 @@ $stats = $db->getOne ("users", "sum(id), count(*) as cnt");
echo "total ".$stats['cnt']. "users found"; echo "total ".$stats['cnt']. "users found";
``` ```
or select one column or function result or select one column value or function result
```php ```php
$count = $db->getValue ("users", "count(*)"); $count = $db->getValue ("users", "count(*)");
...@@ -202,6 +202,7 @@ print_r ($results); // contains Array of returned rows ...@@ -202,6 +202,7 @@ print_r ($results); // contains Array of returned rows
### Where Method ### Where Method
This method allows you to specify where parameters of the query. This method allows you to specify where parameters of the query.
WARNING: In order to use column to column comparisons only raw where conditions should be used as column name or functions cant be passed as a bind variable. WARNING: In order to use column to column comparisons only raw where conditions should be used as column name or functions cant be passed as a bind variable.
Regular == operator with variables: Regular == operator with variables:
......
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