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
9e0a157f
Commit
9e0a157f
authored
May 12, 2014
by
Carsten Brandt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improved docs for AR::findAll()
parent
cb830f74
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
ActiveRecordInterface.php
framework/db/ActiveRecordInterface.php
+9
-5
No files found.
framework/db/ActiveRecordInterface.php
View file @
9e0a157f
...
@@ -183,14 +183,18 @@ interface ActiveRecordInterface
...
@@ -183,14 +183,18 @@ interface ActiveRecordInterface
public
static
function
findOne
(
$condition
);
public
static
function
findOne
(
$condition
);
/**
/**
* Returns a list of active record models that match the specified primary key value or a set of column values.
* Returns a list of active record models that match the specified primary key value
(s)
or a set of column values.
*
*
* The method accepts:
* The method accepts:
*
*
* - a scalar value (integer or string): query by a single primary key value and return the
* - a scalar value (integer or string): query by a single primary key value and return an array containing the
* corresponding record (or null if not found).
* corresponding record (or an empty array if not found).
* - an array of name-value pairs: query by a set of attribute values and return a single record
* - an array of scalar values (integer or string): query by a list of primary key values and return the
* matching all of them (or null if not found).
* corresponding records (or an empty array if none was found).
* Note that an empty condition will result in an empty result as it will be interpreted as a search for
* primary keys and not an empty `WHERE` condition.
* - an array of name-value pairs: query by a set of attribute values and return an array of records
* matching all of them (or an empty array if none was found).
*
*
* Note that this method will automatically call the `all()` method and return an array of
* Note that this method will automatically call the `all()` method and return an array of
* [[ActiveRecordInterface|ActiveRecord]] instances. For example,
* [[ActiveRecordInterface|ActiveRecord]] instances. For example,
...
...
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