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
7f670aaf
Commit
7f670aaf
authored
Jan 22, 2015
by
Alexander Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Additional typo fixed for Database Access Objects guide
parent
4002512d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
db-dao.md
docs/guide/db-dao.md
+3
-3
No files found.
docs/guide/db-dao.md
View file @
7f670aaf
...
@@ -270,7 +270,7 @@ For example,
...
@@ -270,7 +270,7 @@ For example,
```
php
```
php
// executes this SQL for MySQL: SELECT COUNT(`id`) FROM `employee`
// executes this SQL for MySQL: SELECT COUNT(`id`) FROM `employee`
$count
=
$db
->
createCommand
(
"SELECT COUNT([[id]]) FROM
{
{employee}
}
"
)
$count
=
$db
->
createCommand
(
"SELECT COUNT([[id]]) FROM
{
{
%
employee}
}
"
)
->
queryScalar
();
->
queryScalar
();
```
```
...
@@ -301,7 +301,7 @@ when configuring the DB connection. For example,
...
@@ -301,7 +301,7 @@ when configuring the DB connection. For example,
```
php
```
php
// executes this SQL for MySQL: SELECT COUNT(`id`) FROM `tbl_employee`
// executes this SQL for MySQL: SELECT COUNT(`id`) FROM `tbl_employee`
$count
=
$db
->
createCommand
(
"SELECT COUNT([[id]]) FROM
{
{employee}
}
"
)
$count
=
$db
->
createCommand
(
"SELECT COUNT([[id]]) FROM
{
{
%
employee}
}
"
)
->
queryScalar
();
->
queryScalar
();
```
```
...
@@ -347,7 +347,7 @@ The transaction is represented as a [[yii\db\Transaction]] object stored in the
...
@@ -347,7 +347,7 @@ The transaction is represented as a [[yii\db\Transaction]] object stored in the
the queries being executed are enclosed in a
`try...catch...`
block. If all queries are executed successfully,
the queries being executed are enclosed in a
`try...catch...`
block. If all queries are executed successfully,
the
[
[yii\db\Transaction::commit()|commit()
]
] method is called to commit the transaction. Otherwise, an exception
the
[
[yii\db\Transaction::commit()|commit()
]
] method is called to commit the transaction. Otherwise, an exception
will be triggered and caught, and the
[
[yii\db\Transaction::rollBack()|rollBack()
]
] method is called to roll back
will be triggered and caught, and the
[
[yii\db\Transaction::rollBack()|rollBack()
]
] method is called to roll back
the changes made the queries prior to that failed query in the transaction.
the changes made
by
the queries prior to that failed query in the transaction.
### Specifying Isolation Levels <a name="specifying-isolation-levels"></a>
### Specifying Isolation Levels <a name="specifying-isolation-levels"></a>
...
...
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