Skip to content

Commit 8f15313

Browse files
committed
clearify readme on update() function
1 parent 3874194 commit 8f15313

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

readme.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,11 @@ $data = Array (
8181
// active = !active;
8282
);
8383
$db->where ('id', 1);
84-
if($db->update ('users', $data)) echo 'successfully updated';
84+
$cols = $db->update ('users', $data);
85+
echo $cols . ' records were updated';
8586
```
87+
Note that update query will return 0 in case update query will fail AND also in case
88+
where no records were modified.
8689

8790
### Select Query
8891
After any select/get function calls amount or returned rows

0 commit comments

Comments
 (0)