Commit 9f01828a by Budi Irawan

Update active-record.md

add example of using deleteAll
parent 0a860919
......@@ -267,6 +267,9 @@ $customer->save(); // equivalent to $customer->update();
$customer = Customer::findOne($id);
$customer->delete();
// to delete several customers
Customer::deleteAll('age > :age AND gender = :gender', [':age' => 20, ':gender' => 'M']);
// to increment the age of ALL customers by 1
Customer::updateAllCounters(['age' => 1]);
```
......
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