[EMAIL PROTECTED] wrote:
> 
>         I am trying to search a text field within a table that contains
> several keywords; for example the column might be called
> "computer_description" and contain the values "i-mac blue 256MB
> 500MHz ...". Is there any way of putting together a query that says
> something like:
> SELECT * from table1 WHERE computer_description CONTAINS 'blue' ?

Yes.

SELECT * from table1 WHERE computer_description LIKE "%blue%";

> or should I separate this column up into several others  type, colour,
> ram, processor etc...?

Yes. You should do this anyway if you think you're going to be searching
by those a lot, since it'll be more efficient that way.

(In fact, you should make another table for computer types, colors,
processor types, etc, and join the two together.)

-- 
John Klein, Database Applications Developer |  Omnia Mutantur,
Systems Group - Harvard Law School          |  Nihil Interit

---------------------------------------------------------------------
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