Re: how to do a search in mysql database for multiple keywords??
| From: | _lallous | Date: | Mon, 15 Oct 2001 07:42:53 +0000 |
| Subject: | Re: how to do a search in mysql database for multiple keywords?? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-71071@lists.php.net to get a copy of this message | ||
describe your question more...
anyway:
SELECT thetext FROM thetable WHERE
(INSTR(thetext, 'keyword1') <> 0) OR
(INSTR(thetext, 'keyword2') <> 0) OR
(INSTR(thetext, 'keyword3') <> 0);
this will search for either of the three keywords...
"Nicklas Bondesson" <nicke@najki.nu> wrote in message
news:20011013133802.49776.qmail@pb1.pair.com...
> need some help on this. i've come so far that i have split up the variable
> with explode and putting it into an array that looks like this:
> 'keyword1','keyword2'.
>
> but it doesn't doesn't work satisfactory...
>
> any ideas??
>
> /nicke
>
>