For example, existing table tables, which have title,tag,description three fields, record the title, label, and description of a piece of data, respectively. Then, based on the query request entered by the user, the input string is separated into several keywords through a space, and then the records containing these keywords are queried in these three fields. The problem is that these keywords are either one or more of the three fields, but require three fields to contain all the keywords. The MySQL authoritative guide has turned to the use of CONCAT in the book, the description of CONCAT is: CONCAT (str1,str2,...) Return value: The string that is obtained by merging all the access parameters together. Null is returned as long as there is a null value in the input parameter. Concat allows only one input parameter. Therefore, the preceding query can be implemented by the following SQL query
SELECT * from WHERE like '% keyword %'
MySQL single-table multi-field fuzzy query solving method