mongodb\Query column()

column() public method (available since version 2.1.2)

Executes the query and returns the first column of the result.

Column _id will be automatically excluded from select fields, if select() is not empty and _id is not selected explicitly.

public array column ( $db = null )
$db yii\mongodb\Connection

The MongoDB connection used to generate the query. If this parameter is not given, the mongodb application component will be used.

return array

The first column of the query result. An empty array is returned if the query results in nothing.

doc_Yii
2016-10-30 17:08:56
Comments
Leave a Comment

Please login to continue.