Although this method is feasible, it is an extremely inefficient method for full-text search, especially when processing large amounts of data.
Developers simply mark the fields that require full-text search, and then use special MySQL methods to run searches on those fields. This not only improves performance and efficiency (because MySQL indexes these fields to optimize searches), but also implements Higher quality searches because MySQL uses natural language to intelligently rate results to eliminate irrelevant items.
Create a table:
ALTER TABLE table name ADD FULLTEXT INDEX (table field);
use the SHOW INDEXES command to check that the index has been added
. Once you have the data and index, you can use MySQL's full-text search. The simplest full-text search method is with MATCH ...SELECT query of AGAINST statement:
SELECT table field FROM table name WHERE MATCH (full-text search table field) AGAINST ('search string');
finally display the results