homepage Welcome to WebmasterWorld Guest from 54.167.41.199
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderators: physics

Databases Forum

    
mysql match against multiple values
breham




msg:4395709
 7:53 pm on Dec 8, 2011 (gmt 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

 

httpwebwitch




msg:4395741
 9:18 pm on Dec 8, 2011 (gmt 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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Databases
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved