mongodb distinct & sort
up vote
0
down vote
favorite
I want to extrapolate the data from MongoDB by setting distinct and order.
trying this, but I get an error:
<?php
//all users distinct
$un = $collection->distinct("creato_da").sort({'creato_da': 1});
foreach ($un as $u) {
echo $u["creato_da"] . " - ";
}
?>
mongodb sorting distinct
add a comment |
up vote
0
down vote
favorite
I want to extrapolate the data from MongoDB by setting distinct and order.
trying this, but I get an error:
<?php
//all users distinct
$un = $collection->distinct("creato_da").sort({'creato_da': 1});
foreach ($un as $u) {
echo $u["creato_da"] . " - ";
}
?>
mongodb sorting distinct
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I want to extrapolate the data from MongoDB by setting distinct and order.
trying this, but I get an error:
<?php
//all users distinct
$un = $collection->distinct("creato_da").sort({'creato_da': 1});
foreach ($un as $u) {
echo $u["creato_da"] . " - ";
}
?>
mongodb sorting distinct
I want to extrapolate the data from MongoDB by setting distinct and order.
trying this, but I get an error:
<?php
//all users distinct
$un = $collection->distinct("creato_da").sort({'creato_da': 1});
foreach ($un as $u) {
echo $u["creato_da"] . " - ";
}
?>
mongodb sorting distinct
mongodb sorting distinct
asked Nov 10 at 17:08
max
84
84
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53241365%2fmongodb-distinct-sort%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown