Welcome to WebmasterWorld Guest from 54.147.189.54

Forum Moderators: open

Message Too Old, No Replies

mysql match against multiple values

     
7:53 pm on Dec 8, 2011 (gmt 0)

Junior Member

10+ Year Member

joined:Jan 18, 2006
posts: 46
votes: 0


Hi,

I have a query which says

SELECT * FROM data WHERE MATCH (nike,trainers) AGAINST (brand,title,description)


What I want to do is extend that a bit to say that Nike can be 'Nike or Adidas' and trainers could be 'trainers or running shoes' or even 'trainers OR running shoes OR plimsoles'

Any ideas on the formatting of the query - or if it's even possible?

Many thanks in advance

Brett
9:18 pm on Dec 8, 2011 (gmt 0)

Moderator from CA 

WebmasterWorld Administrator httpwebwitch is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Aug 29, 2003
posts:4059
votes: 0


is this mysql?

and... do you have a full-text index on those fields?

if so, check this out:
[dev.mysql.com...]

when crafting the query, you might need to replace " OR " with " ", "NOT" with "-", etc