How to search for a certain substring in all text fields of all tables in a database?
PS One-time task, software like sphinx'a do not plan to use: =)
How to search for a certain substring in all text fields of all tables in a database?
PS One-time task, software like sphinx'a do not plan to use: =)
One request - no way. You can either create (by hand or shell script) on request for each table of the form SELECT * from tbl_name WHERE field1 LIKE 'string' OR field2 LIKE 'string' OR field...n LIKE 'string' and execute them in turn, or use something like phpMyAdmin - there is such functionality out of the box, it’s enough to set the string to search in the web interface.
Of course, it works wildly slowly, but you say that the task is a one-time task - well.
Source: https://ru.stackoverflow.com/questions/419856/
All Articles