Search Field
| From: | MikeParton | Date: | Fri, 14 Jun 2002 00:21:20 +0000 |
| Subject: | Search Field | ||
| Groups: | php.install | ||
| Request: | Send a blank email to php-install+get-7327@lists.php.net to get a copy of this message | ||
Environment:
Win NT 4.0 SP6a
Apache 2.0.36
MYSQL 4.0.1a
PHP 4.2.1
I'd like to create a search capability against a MySQL database that will allow users to do
keyword searches, entering one OR MORE keywords in the text box.
Thoughts on the most effective way to do this?
Would this be handled by the sql where the statement is something like:
$keywords=$selection //equal to the keywords entered by the user in the text box named
"selection"
SELECT column1, column2 FROM table WHERE text=$keywords
What do I need to do to make sure the query searches for ANY of the keywords entered into the text
box?
TIA
Mike
SQL,query,MySQL