Can't execute query

			SELECT a.*, b.name AS brand_name
			FROM eshop_products a JOIN sw_sequences s ON (s.id_table=a.id AND s.table_name='eshop_products')
				LEFT OUTER JOIN eshop_brands b ON (b.id=a.id_eshop_brands)
			WHERE (id_eshop_def IN (29,43,44,45,46,47,48,49,50,27,28,39,41,42,26,25,54,56,55,57,58,59,30,31,32,33,34,35,36,51,52,37,69,68,38,65,66,67,0)
			AND date_from<NOW() AND date_to>NOW()
			
			AND visible=1
			AND archived=0
			AND a.id_eshop_brands=)
			OR (date_always=0
			
			AND visible=1
			AND id_eshop_def IN (29,43,44,45,46,47,48,49,50,27,28,39,41,42,26,25,54,56,55,57,58,59,30,31,32,33,34,35,36,51,52,37,69,68,38,65,66,67,0)
			AND archived=0
			AND a.id_eshop_brands=)
			
			ORDER BY a.id_product ASC, s.sequence
			 LIMIT 0, 20
		

MySQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') OR (date_always=0 AND visible=1 AND id_eshop_def IN (29,43,44,45,' at line 9

This script cannot continue, terminating.