mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-16 15:21:13 +08:00
Additional typo fixed for Database Access Objects guide
This commit is contained in:
@ -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,
|
|||||||
|
|
||||||
```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
|
|||||||
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>
|
||||||
|
Reference in New Issue
Block a user