Commit 555fcb70 authored by Alexander Butenko's avatar Alexander Butenko

update readme on update() limit

parent 38e00c47
...@@ -660,8 +660,7 @@ class MysqliDb ...@@ -660,8 +660,7 @@ class MysqliDb
* *
* @param string $tableName The name of the database table to work with. * @param string $tableName The name of the database table to work with.
* @param array $tableData Array of data to update the desired row. * @param array $tableData Array of data to update the desired row.
* @param int|array $numRows Array to define SQL limit in format Array ($count, $offset) * @param int $numRows Limit on the number of rows that can be updated.
* or only $count
* *
* @return bool * @return bool
*/ */
......
...@@ -152,6 +152,12 @@ else ...@@ -152,6 +152,12 @@ else
echo 'update failed: ' . $db->getLastError(); echo 'update failed: ' . $db->getLastError();
``` ```
`update()` also support limit parameter:
```php
$db->update ('users', $data, 10);
// Gives: UPDATE users SET ... LIMIT 10
```
### Select Query ### Select Query
After any select/get function calls amount or returned rows is stored in $count variable After any select/get function calls amount or returned rows is stored in $count variable
```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