2013-12-21 64 views

回答

1

你可以做一個查詢和收集所需的標籤搜索:

例如:

BasicDBObject query = new BasicDBObject("email", email_to_seach); 

DBCursor cursor = coll.find(query); 

try { 
    while(cursor.hasNext()) { 
     System.out.println(cursor.next()); 
    } 
} finally { 
    cursor.close(); 
} 

此外,您還可以找只具有電子郵件或頭文件你想要的手機,與:

BasicDBObject query = new BasicDBObject("email", email_to_seach); 
DBObject myDoc = coll.findOne(query); 
相關問題