Skip to content

Commit 555fcb7

Browse files
committed
update readme on update() limit
1 parent 38e00c4 commit 555fcb7

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

MysqliDb.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -660,8 +660,7 @@ public function has($tableName)
660660
*
661661
* @param string $tableName The name of the database table to work with.
662662
* @param array $tableData Array of data to update the desired row.
663-
* @param int|array $numRows Array to define SQL limit in format Array ($count, $offset)
664-
* or only $count
663+
* @param int $numRows Limit on the number of rows that can be updated.
665664
*
666665
* @return bool
667666
*/

readme.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,12 @@ else
152152
echo 'update failed: ' . $db->getLastError();
153153
```
154154

155+
`update()` also support limit parameter:
156+
```php
157+
$db->update ('users', $data, 10);
158+
// Gives: UPDATE users SET ... LIMIT 10
159+
```
160+
155161
### Select Query
156162
After any select/get function calls amount or returned rows is stored in $count variable
157163
```php

0 commit comments

Comments
 (0)