2016-11-12 43 views

回答

0

嘗試使用$or

table.find({ $or:[ {'sport_type':'Cricket'}, {'sport_type':'Football'} ]}, 
    function(err,docs){ 
    // do something 
}); 
+0

您的回答相當於'Select * from table_name where sport_type ='Cricket'or sport_type ='Football';'。他尋找一個「LIKE」比較。 – Mitchapp

+0

@Mitchapp OP正在嘗試使用「Cricket」或「Football」的「sport_type」來查找文檔。我不認爲他在尋找一種模式。 –