Illegal mix of collations (cp1251_general_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='
SELECT COUNT(DISTINCT p.productID) as cnt FROM SC_products p LEFT JOIN SC_tagged_objects t2 ON p.productID=t2.object_id LEFT JOIN SC_tags t1 ON t2.tag_id=t1.id AND t2.object_type="product" WHERE ( ( LOWER(t1.name) LIKE '%koyo%') AND categoryID<>1 AND enabled=1) OR (in_stock>0 and enabled=1 AND (((`type_ru` = '������������������ ��������������' AND `firma_ru` = 'KOYO'))))