Hi,
i am building a catalog site.. each catalog item is identified by a bunch of keywords (i.e. red, plastic, discount) etc.
right now these keywords are being stored in individual table columns (i.e. keyword1, keyword2, keyword3..) for each item. there isn't a lot of overlap or repeated keywords so i thought this would be best.
it is relatively painless to search for any single keyword this way.
my question is, how can i build a mySQL search query which can perform logical AND/OR/NOT or on all of the keyword columns at the same time?
eg: find all items with keywords RED and PLASTIC but not DISCOUNT?
any help would be appreciated.
thanks,
shaw-han
i am building a catalog site.. each catalog item is identified by a bunch of keywords (i.e. red, plastic, discount) etc.
right now these keywords are being stored in individual table columns (i.e. keyword1, keyword2, keyword3..) for each item. there isn't a lot of overlap or repeated keywords so i thought this would be best.
it is relatively painless to search for any single keyword this way.
my question is, how can i build a mySQL search query which can perform logical AND/OR/NOT or on all of the keyword columns at the same time?
eg: find all items with keywords RED and PLASTIC but not DISCOUNT?
any help would be appreciated.
thanks,
shaw-han