KloD
ASFN Icon
Anyone good with MySQL? I'm writing a web application and in it I have a form that allows the users to submit text and files to a MySQL database. The issue I'm having is w/ the search engine. I'm able to search for one word from one column. ("select * FROM table WHERE column like \"%$trimmed%\" order by created_at DESC" ;
However, I need to both search all columns of one row for multiple words, if any of the words appear in the row, it will display a result.
ex.
| column 1 | column 2 | column 3
--------------------------------
| test | play | set
| only | test | other
| pass | set | new
user puts 'test, set' it would echo rows 1 and 3.
Then I need to drill down and get reults for (test AND set).
It would echo back only row 1.
These are two seperate searches (basic and advanced) and have their own PHP pages.
Can anyone help?
Thanks!
However, I need to both search all columns of one row for multiple words, if any of the words appear in the row, it will display a result.
ex.
| column 1 | column 2 | column 3
--------------------------------
| test | play | set
| only | test | other
| pass | set | new
user puts 'test, set' it would echo rows 1 and 3.
Then I need to drill down and get reults for (test AND set).
It would echo back only row 1.
These are two seperate searches (basic and advanced) and have their own PHP pages.
Can anyone help?
Thanks!