Commit 63bb6efb by Alexander Makarov

wording fixes for AR docs

parent ebecc098
The returned [[ActiveQuery]] instance can be further customized by calling The returned [[ActiveQuery]] instance can be further customized by calling
methods defined in [[ActiveQuery]] before returning the populated active records. methods defined in [[ActiveQuery]] before `one()`, `all()` or `value()` is
called to return the populated active records:
Below are some examples:
~~~ ~~~
// find all customers // find all customers
$customers = Customer::find()->all(); $customers = Customer::find()->all();
// find all active customers and order them by their age: // find all active customers and order them by their age:
$customers = Customer::find() $customers = Customer::find()
->where(array('status' => 1)) ->where(array('status' => 1))
->orderBy('age') ->orderBy('age')
->all(); ->all();
// find a single customer whose primary key value is 10 // find a single customer whose primary key value is 10
$customer = Customer::find(10); $customer = Customer::find(10);
// the above is equivalent to: // the above is equivalent to:
$customer = Customer::find()->where(array('id' => 10))->one(); $customer = Customer::find()->where(array('id' => 10))->one();
// find a single customer whose age is 30 and whose status is 1 // find a single customer whose age is 30 and whose status is 1
$customer = Customer::find(array('age' => 30, 'status' => 1)); $customer = Customer::find(array('age' => 30, 'status' => 1));
// the above is equivalent to: // the above is equivalent to:
$customer = Customer::find()->where(array('age' => 30, 'status' => 1))->one(); $customer = Customer::find()->where(array('age' => 30, 'status' => 1))->one();
~~~ ~~~
\ No newline at end of file
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