Commit 24621c3d by Qiang Xue

improved doc

parent 08cd4e82
......@@ -23,10 +23,13 @@ use yii\base\Component;
*
* ~~~
* $query = new Query;
* // compose the query
* $query->select('id, name')
* ->from('tbl_user')
* ->limit(10);
* // build and execute the query
* $rows = $query->all();
* // alternatively, you can create DB command and execute it
* $command = $query->createCommand();
* // $command->sql returns the actual SQL
* $rows = $command->queryAll();
......
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