As dumb as it sounds, is there a way to do something like this:
select row_id from mytable where * like '%searched_text%';
By * here I mean "all the fields" in the table, instead of me specifying them one by one...
As dumb as it sounds, is there a way to do something like this:
select row_id from mytable where * like '%searched_text%';
By * here I mean "all the fields" in the table, instead of me specifying them one by one...
Yes, it's called Full Text Search.
You can use MySQL's built-in Full Text Search, or use a separate product to do you text indexing such as Apache's Lucene (my personal favorite).
It is not possible with one query.
However when you do:
DESCRIBE table_name;
you get the field names which you can generate the query from.
http://stackoverflow.com/questions/639531/mysql-search-in-all-fields-from-every-table-from-a-database May be useful.