Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
63bb6efb
Commit
63bb6efb
authored
Jan 17, 2013
by
Alexander Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wording fixes for AR docs
parent
ebecc098
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
66 additions
and
47 deletions
+66
-47
ActiveRecord-find.md
docs/api/db/ActiveRecord-find.md
+8
-3
ActiveRecord.md
docs/api/db/ActiveRecord.md
+58
-44
No files found.
docs/api/db/ActiveRecord-find.md
View file @
63bb6efb
The returned
[
[ActiveQuery
]
] instance can be further customized by calling
methods defined in
[
[ActiveQuery
]
] before returning the populated active records.
Below are some examples:
methods defined in
[
[ActiveQuery
]
] before
`one()`
,
`all()`
or
`value()`
is
called to return the populated active records:
~~~
// find all customers
$customers = Customer::find()->all();
// find all active customers and order them by their age:
$customers = Customer::find()
->where(array('status' => 1))
->orderBy('age')
->all();
// find a single customer whose primary key value is 10
$customer = Customer::find(10);
// the above is equivalent to:
$customer = Customer::find()->where(array('id' => 10))->one();
// find a single customer whose age is 30 and whose status is 1
$customer = Customer::find(array('age' => 30, 'status' => 1));
// the above is equivalent to:
$customer = Customer::find()->where(array('age' => 30, 'status' => 1))->one();
~~~
\ No newline at end of file
docs/api/db/ActiveRecord.md
View file @
63bb6efb
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment