Commit 4267b53d by Carsten Brandt

added doc about count() return value

fixes #yiisoft/yii#3712
parent 4ae7eb18
......@@ -273,7 +273,8 @@ class Query extends Component implements QueryInterface
* Make sure you properly quote column names in the expression.
* @param Connection $db the database connection used to generate the SQL statement.
* If this parameter is not given (or null), the `db` application component will be used.
* @return integer number of records
* @return integer|string number of records. The result may be a string depending on the
* underlying database engine and to support integer values higher than a 32bit PHP integer can handle.
*/
public function count($q = '*', $db = null)
{
......@@ -286,7 +287,7 @@ class Query extends Component implements QueryInterface
* Make sure you properly quote column names in the expression.
* @param Connection $db the database connection used to generate the SQL statement.
* If this parameter is not given, the `db` application component will be used.
* @return mixed the sum of the specified column values
* @return mixed the sum of the specified column values.
*/
public function sum($q, $db = null)
{
......
......@@ -44,7 +44,7 @@ interface QueryInterface
* @param string $q the COUNT expression. Defaults to '*'.
* @param Connection $db the database connection used to execute the query.
* If this parameter is not given, the `db` application component will be used.
* @return integer number of records
* @return integer number of records.
*/
public function count($q = '*', $db = null);
......
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