1024programmer Java How to use php to perform fuzzy query on mongodb (there is Chinese in the query condition)

How to use php to perform fuzzy query on mongodb (there is Chinese in the query condition)

How to use php to perform fuzzy query on mongodb (there is Chinese in the query condition)?
It is known that there are two pieces of data in mongodb:
{“bc”: “012345678”,”name”: “Vida Tissue Flower Rhyme”,”cls”: “Daily Necessities”,”num”: “100”}

{“bc”: “12345678”,”name”: “Vinda Tissue”, “cls”:”Daily Necessities”, “num”: “10” }

How to use php to perform fuzzy query on it. For example, if you query the records containing “Vida” in the name, all two records will be returned.

Can anyone help me write a function where the input parameter is a string (such as “Vida”) and the return value is an array array. Thank you~~

——Solution——————–
http://www.lnmp100.com/505

In fact, it is a regular rule.

This article is from the internet and does not represent1024programmerPosition, please indicate the source when reprinting:https://www.1024programmer.com/790140

author: admin

Previous article
Next article

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索