views:

23

answers:

1

I'm wanting to do an ANDing or ORing in my mysql query, but the LIMIT needs to be the same regardless.

eg. SELECTION * FROM table WHERE text LIKE %word1 OR word2 OR word3% LIMIT 10

I'd like this to work the same way it does on twitter, but I'm finding no help from google :(

+1  A: 

SELECT * FROM table WHERE (text LIKE %word1%) OR (text LIKE %word2%) OR (text LIKE %word3%) LIMIT 10

RyuuGan