Answer the question
In order to leave comments, you need to log in
How to do a MySQL search in a table by parameter?
There is a procedure at which input parameter Word.
You need to make a selection in the states table by this parameter with any letters on the sides. SELECT html from states where tags like '%word%';
The search is carried out exactly as by the word word, and not by the value of this parameter. You need to match the parameter with the "%" sign.
Answer the question
In order to leave comments, you need to log in
Well, if word is a parameter, then replace the substring with the value of the word parameter.
In many languages, this is done by the string formatting function (format), but only special functions that come "bundled" in the framework or DBMS adapters will do this in a safe way.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question