the echoed statement looks like this
SELECT * FROM Toode WHERE ((brand LIKE '%IN1%' OR mark LIKE '%IN1%' OR lyhitutvustus LIKE '%IN1%') AND (brand LIKE '%IN2%' OR mark LIKE '%IN2%' OR lyhitutvustus LIKE '%IN2%')) AND ((NOT(brand LIKE '%NOT1%') AND NOT(mark LIKE '%NOT1%') AND NOT(lyhitutvustus LIKE '%NOT1%')) AND (NOT(brand LIKE '%NOT2%') AND NOT(mark LIKE '%NOT2%') AND NOT(lyhitutvustus LIKE '%NOT2%'))) AND tyyp IN ('digi','peegel','kompakt','lisa') AND hind >= '1000' AND hind <= '2000'
or like this
SELECT * FROM Toode WHERE ((brand LIKE '%IN1%' OR mark LIKE '%IN1%' OR lyhitutvustus LIKE '%IN1%') OR (brand LIKE '%IN2%' OR mark LIKE '%IN2%' OR lyhitutvustus LIKE '%IN2%')) AND ((NOT(brand LIKE '%NOT1%') AND NOT(mark LIKE '%NOT1%') AND NOT(lyhitutvustus LIKE '%NOT1%')) OR (NOT(brand LIKE '%NOT2%') AND NOT(mark LIKE '%NOT2%') AND NOT(lyhitutvustus LIKE '%NOT2%'))) AND tyyp IN ('digi','peegel','kompakt','lisa') AND hind >= '1000' AND hind <= '2000'
but it is not working. for instance, if i search for fields including 'a' i get, say, 100 answers. if i search for fields not including 'a' i ger 300 answers - but altogether there are more than thousand fields!
or maybe i have completely misused LIKE for searching but it seemed a right and logical thing to use...
please help