Commit 9142454a authored by Alexander Butenko's avatar Alexander Butenko

update readme with boolean examples

parent 79f9aeaf
...@@ -28,6 +28,7 @@ Insert with functions use ...@@ -28,6 +28,7 @@ Insert with functions use
```php ```php
$data = Array( $data = Array(
'login' => 'admin', 'login' => 'admin',
'active' => true,
'firstName' => 'John', 'firstName' => 'John',
'lastName' => 'Doe', 'lastName' => 'Doe',
'password' => $db->func('SHA1(?)',Array ("secretpassword+salt")), 'password' => $db->func('SHA1(?)',Array ("secretpassword+salt")),
...@@ -51,8 +52,8 @@ $data = Array ( ...@@ -51,8 +52,8 @@ $data = Array (
'lastName' => 'Tables', 'lastName' => 'Tables',
'editCount' => $db->inc(2), 'editCount' => $db->inc(2),
// editCount = editCount + 2; // editCount = editCount + 2;
'editBoolean' => $db->not() 'active' => $db->not()
// editBoolean = !editBoolean; // active = !active;
); );
$db->where('id', 1); $db->where('id', 1);
if($db->update('users', $data)) echo 'successfully updated'; if($db->update('users', $data)) echo 'successfully updated';
......
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