MySQL uses another field for fuzzy query
P粉333186285
2023-07-25 11:34:12
<p>I have a table with two string columns: Url and ModelId. I need to return those records whose URL contains ModelId, similar to this query: </p>
<pre class="brush:php;toolbar:false;">SELECT Id, Url, ModelId WHERE Url like "%ModelId%"</pre>
<p><br /></p>
You can't just concatenate strings, you must also escape the fields, using the special characters % and _: