SQL statement is ignoring where parameter

Fix your parentheses

SELECT * FROM people 
WHERE
    university='2' 
    AND (MATCH (lname,fname) AGAINST ('+massive' IN BOOLEAN MODE) 
         OR fname LIKE '%box%' 
         OR lname LIKE '%box%') 

AND has higher precedence than OR, so university = '2' was only being combined with MATCH, not with the fname/lname tests.

Leave a Comment