Hi Gurus
Is there a way to search for a word in any of the fields of a row using simple sql for my sql?
I have a rather complex search function on my site and right now, I dump all the text of all fields (that are text fields) in a
special field. The search function then searches this "keyword" field.
Is there a smarter way of doing this.
To recoup
I have an mysql database with about 500 records, each containing over 20 text fields (address, name, etc.... etc....). I want the
user to be able to search for a particular word (e.g. fishing or rock climbing) in all records and all fields and I would like Mysql
to return the IDs of the fields that match.
Along the lines of
SELECT ID FROM TABLE WHERE * LIKE "%test%";
Is there a way to search for a word in any of the fields of a row using simple sql for my sql?
I have a rather complex search function on my site and right now, I dump all the text of all fields (that are text fields) in a
special field. The search function then searches this "keyword" field.
Is there a smarter way of doing this.
To recoup
I have an mysql database with about 500 records, each containing over 20 text fields (address, name, etc.... etc....). I want the
user to be able to search for a particular word (e.g. fishing or rock climbing) in all records and all fields and I would like Mysql
to return the IDs of the fields that match.
Along the lines of
SELECT ID FROM TABLE WHERE * LIKE "%test%";
Comment