Well, basically, I want to let my users search through "row1", "row2" and "row3" by only using one form field. My code currently looks like this (it's in PHP):
Code:
... AND `row1` LIKE \'' . $search_text . '\',
`row2` LIKE \'' . $search_text . '\',
`row3` LIKE \'' . $search_text . '\',
`row4` LIKE \'' . $search_text . '\''
However, that doesn't work. There are some other fields that are submitted, so that's why there's an "AND" at the beginning. I don't post the other parts since I know they work properly.
But how can I search through multiple rows, and show the database entry if it finds $search_text in at least one of the fields?
|