2014년 12월 27일 토요일

how can implement populate method in php with mongodb

how to write php query for implment populate with fetch data in mongodb collections. any one help me thanks in advance..
 user collection

collection1{
"_id" : ObjectId("testusserid"),
  "__v" : 0,
name:test...
}


collection2 

collection2{
"_id" : ObjectId("collection2 id"),
  "__v" : 0,

reported by:_id" : ObjectId("testusserid"),
}


now i want collection1 and collection 2 to implement populate method for fetch name based on reported by_id document on collection2 




댓글 없음:

댓글 쓰기