Wednesday, 15 July 2015

cakephp - How do I do a LIKE in mongoDB? -



cakephp - How do I do a LIKE in mongoDB? -

this question has reply here:

how query mongodb “like”? 18 answers

db.courses.find({"course_number":"/^afprl/"}) returns nothing.

the next db entry. forgive me i'm new mongodb. believe i'm trying perform equivalent of operation in mysql?

{ _id: objectid("51072be2f046ed1c0e000000"), course_number: "afprl 100.00", room: "hw  215", }

the regular look not string. should be

db.courses.find({"course_number": /^afprl/})

mongodb cakephp

No comments:

Post a Comment