Questions tagged [mongo-collection]
110 questions
0
votes
0 answers
How to add collection name in the output of map reduce job to get all the keys in the collection with collection name .my code is like
var allCollections = db.getCollectionNames();
for (var i = 0; i < allCollections.length; ++i) {
var collectioname = allCollections[i];
if (collectioname === 'system.indexes')
continue;
db.runCommand(
{ "mapreduce" :…

user2609099
- 27
- 1
- 6
0
votes
1 answer
return a mongo object php for mongocollection
I have a mongo class, which I later want to add CRUD functions into it, but as of now I want to write my own collection functions after I created objoect of Mongo, so anytime I want to use mongodb I just create object of my class, and write the…

meWantToLearn
- 1,691
- 2
- 25
- 45
-1
votes
1 answer
MongoDB query to capitalise first letter in existing database
Here is the problem,
I want to capitalise the first letter of a name in my existing
database, just wanted to know if there is any query so that i can make
it possbile.
what i want -- in my database so many names is in unformatted ways.. like…

user6409738
- 11
- 8
-1
votes
1 answer
mongo db group-order
i want to mongodb query this sql query's:
select x,y,message,foo from messege where x=1 and y=1 group by x,y order by _id DESC
but with :
MongoCollection::group
can anyone help me?

Musher
- 85
- 1
- 2
- 7
-5
votes
1 answer
Mongodb query equivalent of the following SQL query
I have a table as UserData which has strucure like
id category value
1 AR 100
2 WT 90
3 WT 12
4 AR 1000
5 AR 2005
6 WT 122
7 BP 112
8 BP 18
now I want to…

Learner
- 1,277
- 3
- 15
- 34