2
我想要显示查找到的记录数以及其下方的搜索结果的总数。目前,我这样做有2个查询像这样:mongodb搜索结果
$total_results = $mydb->count($qry);
$r = $mydb->find($qry)
->skip($pagination*$results_per_page)
->limit($results_per_page);
是否有可能以某种方式结合计数,发现查询到,返回两个信息的单次调用?或者,这只能通过发布2个单独的查询来完成,就像我已经在做的那样?