Can't execute query

SELECT id, name, category_id, cena_historia, cena1, price
    FROM products
    WHERE zobraz !=0 AND price !=0 AND dostupnost !='x' AND dostupnost !='n'  AND part_num !=''  AND part_num IN ('' ,'')
    GROUP BY part_num
    ORDER BY on_special desc, klik
    LIMIT 15

MySQL Error: Lost connection to MySQL server during query

This script cannot continue, terminating.