Thursday, March 22, 2018

Yii2 mongo db group by count example

$collection = Yii::$app->mongodb->getCollection('collectionname');

        $callingstationidCount = $collection->aggregate([
            array('$group' => array(
                    '_id' => '$columnname',
                    'count' => array('$sum' => 1)
                ))
                ]
        );

No comments:

How to solve mysql ERROR 1118 (42000) Row size too large

  I had this issue with MYSQL 5.7 . The following worked althoug...