In message <[EMAIL PROTECTED]>, 
"Mike<mickalo>Blezien" <[EMAIL PROTECTED]> writes
>Hello All,
>
>We have a table where keywords will be entered into a column (searchwords), up
>to 3 unique keywords. Then this column will be used in a keywords 
>search tied to
>a Category(a Category has to be selected). The table will have a category
>column: category. Basically when a search is done, it will be something like
>
>WHERE category = '$CatSelected' AND searchwords IN '$keyword1'
>OR searchwords IN '$keyword2'... etc..
>
>or
>
>WHERE category = '$CatSelected' AND searchwords LIKE "$keyword1%"
>OR searchwords LIKE "$keyword1%".... etc...
>
>Now the problems we seem to have is how we should enter the keywords into the
>searchwords column. there can be up to 3. Should they be entered as:
>keyword1,keyword2,keyword3 or  keyword1 keyword2 keyword3(as a string). What
>would be the best way to do this so that we can do a search on the all the
>keywords entered into the searchwords column.
>
>Any suggestion/advise much appreciated.

Have a look at the FULLTEXT feature which has just appeared in MySQL.. I 
have a similar problem, and this fits it magically. See also the 
enhanced FULLTEXT die in MySQL 4.0 - which I hope is going to appear 
soon.

-- 
Alec Cawley

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to