Hi, Could anyone help me with this one. I'm working on a search engine and trying to allow it exclude words.

I'm trying to get this query to exclude results with 'Frame' but it doesn't work. Any idea what's wronf with it?

SELECT *
FROM products
WHERE (
Code LIKE "%picture%"
AND Code NOT LIKE "%Frame%"
OR Title LIKE "%picture%"
AND Title NOT LIKE "%Frame%"
OR Description LIKE "%picture%"
AND Description NOT LIKE "%Frame%"
OR Keywords LIKE "%picture%"
AND Keywords NOT LIKE "%Frame%"
)

I've tried searching for solutions but I've not found anything useful so far.

    problem solved

    
    SELECT *
    FROM products
    WHERE
    (Code LIKE "%picture%" OR Description LIKE "%picture%" OR Title LIKE "%picture%"OR Keywords LIKE "%picture%")
    AND
    (Code NOT LIKE "%Frame%" AND Title NOT LIKE "%Frame%" AND Description NOT LIKE "%Frame%" AND Keywords NOT LIKE "%Frame%")
    
    
      Write a Reply...