How to use php to perform a fuzzy query on mongodb (the query conditions include Chinese characters )? Mongodb has two data records: {& quot; bc & quot;: & quot; 012345678 & quot;, & quot; name & quot;: & quot; rhyme of Vida paper towel & quot;, & quot; cls & quot;: & quot; daily necessities & quot;, & quot; num & quot ;: & how does quo use php to perform fuzzy query on mongodb (the query conditions include Chinese characters )?
Mongodb has two data records:
{"Bc": "012345678", "name": "rhyme of Vida paper towel", "cls": "Daily Necessities", "num": "100 "}
{"Bc": "12345678", "name": "Vida paper towel", "cls": "Daily Necessities", "num": "10 "}
How to use php to perform a fuzzy query on it. for example, if the query name contains "Vida" records, all two records are returned.
Which one can help write a function? the input parameter is a string (such as "Vida"), and the returned value is an array. Thank you ~~
------ Solution --------------------
Http://www.lnmp100.com/505
It is actually a regular expression.