Commit 3ac7240a by Alexander Makarov

Fixes #2344

parent c8da5372
...@@ -182,7 +182,7 @@ Quoting table and column names ...@@ -182,7 +182,7 @@ Quoting table and column names
Most of the time you would use the following syntax for quoting table and column names: Most of the time you would use the following syntax for quoting table and column names:
```php ```php
$sql = "SELECT COUNT([[$column]]) FROM {{$table}}"; $sql = "SELECT COUNT([[$column]]) FROM {{table}}";
$rowCount = $connection->createCommand($sql)->queryScalar(); $rowCount = $connection->createCommand($sql)->queryScalar();
``` ```
...@@ -192,7 +192,7 @@ quoted table name. ...@@ -192,7 +192,7 @@ quoted table name.
For table names there's a special variant `{{%Y}}` that allows you to automatically appending table prefix if it is set: For table names there's a special variant `{{%Y}}` that allows you to automatically appending table prefix if it is set:
```php ```php
$sql = "SELECT COUNT([[$column]]) FROM {{%$table}}"; $sql = "SELECT COUNT([[$column]]) FROM {{%table}}";
$rowCount = $connection->createCommand($sql)->queryScalar(); $rowCount = $connection->createCommand($sql)->queryScalar();
``` ```
......
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