标签: mongodb sorting distinct
我想通过设置distinct和order从MongoDB推断数据。 尝试此操作,但出现错误:
<?php //all users distinct $un = $collection->distinct("creato_da").sort({'creato_da': 1}); foreach ($un as $u) { echo $u["creato_da"] . " - "; } ?>