How can I use limit,count and sort with distinct in mongo from PHP ? I am using mongo command functionality and the code is like :
$data_count= $mongoInstance>command(array("distinct"=>"collection","key"=>"key","query"=>$filter_query));
How can I associate count, sort and limit with this ?
There is some aggeregate framework in mongo but how can I use it in PHP ?