Commit 9c4570ec by Manop Kongoon Committed by Carsten Brandt

Update db-dao.md

close #5350
parent e1a1745a
......@@ -229,7 +229,7 @@ In order to securely pass query parameters you can use prepared statements:
```php
$command = $connection->createCommand('SELECT * FROM post WHERE id=:id');
$command->bindValue(':id', $_GET['id']);
$post = $command->query();
$post = $command->queryOne();
```
Another usage is performing a query multiple times while preparing it only once:
......
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