From 79866ee3e020083184fac9933b3fe63ba0ddec14 Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Fri, 29 Nov 2013 19:26:01 -0500 Subject: [PATCH] Improved Query::select() doc. --- framework/yii/db/Query.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/framework/yii/db/Query.php b/framework/yii/db/Query.php index 20d13a8..870c66d 100644 --- a/framework/yii/db/Query.php +++ b/framework/yii/db/Query.php @@ -266,6 +266,10 @@ class Query extends Component implements QueryInterface * Columns can contain table prefixes (e.g. "tbl_user.id") and/or column aliases (e.g. "tbl_user.id AS user_id"). * The method will automatically quote the column names unless a column contains some parenthesis * (which means the column contains a DB expression). + * + * Note that if you are selecting an expression like `CONCAT(first_name, ' ', last_name)`, you should + * use an array to specify the columns. Otherwise, the expression may be incorrectly split into several parts. + * * @param string $option additional option that should be appended to the 'SELECT' keyword. For example, * in MySQL, the option 'SQL_CALC_FOUND_ROWS' can be used. * @return static the query object itself