0

I want to query something with SQL's like query:

SELECT * FROM users WHERE name LIKE '%m%'

How to do I achieve the same in MongoDB? I can't find an operation for like in the documentation of codeigniter.

  • Does this answer your question? [How to query MongoDB with "like"](https://stackoverflow.com/questions/3305561/how-to-query-mongodb-with-like) – mickmackusa Sep 20 '22 at 04:29

1 Answers1

0

db.users.find({"name": /m/}))

Should be everything you need.

Nicolae Maties
  • 2,476
  • 1
  • 16
  • 26