Hello Group, Can any one give me some suggestion how to get distinct or group by columns from MongoDB?
I am using https://github.com/ichikaway/mongoDB-Datasource link for Cakephp and MongoDB integration. My query is like this. $winnersdrawnquery = $this->Karbonnincoming->find('all', array( 'fields' => array('msisdn', 'imei', 'received', 'operator', 'circle'), 'order' => rand(), 'limit' => '3', 'group' => 'msisdn', 'conditions' => array("Karbonnincoming.created" => array('$gt' => $startdate, '$lte' => $enddate), 'Karbonnincoming.status' => 'Valid'), 'contain' => false)); $this->set('winners', $winnersdrawnquery); But it is not working with group condition. Please suggest. Regards Tapan Thapa -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
