Illegal mix of collations (cp1251_general_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation '=' SQL query : select distinct p.productID from SS_products p, SS_categories cc, SS_categories ccp where p.`enabled`=1 and p.productID != '955' and p.`categoryID`>1 and cc.`categoryID` = p.`categoryID` and cc.`c_enabled`=1 and cc.`parent`>1 and cc.`parent`='299' and ccp.`categoryID`=cc.`parent` and ccp.`c_enabled`=1 and (('8129' < (select post.price_full from SS_product_options_set post, SS_product_options_values povt where post.optionID=7 and povt.optionID=7 and post.productID=povt.productID and povt.option_type=1 and post.price_full>0 and post.productID=p.productID order by post.price_full asc LIMIT 0, 1)) or p.productID in (select distinct post.productID from SS_product_options_set post, SS_product_options_values povt where post.optionID=7 and povt.optionID=7 and post.productID=povt.productID and povt.option_type=0 and (p.Price + post.price_surplus) > '8129' )) and p.productID in ((select distinct tbl_pos.productID from SS_product_options_set tbl_pos, SS_products_opt_val_variants tbl_povv where tbl_pos.optionID='15' and tbl_pos.variantID=tbl_povv.variantID and tbl_povv.optionID='15' and convert(convert(tbl_povv.option_value using binary) using cp1251)='да' order by tbl_povv.sort_order asc)) and p.`categoryID` in (302) and not (p.`categoryID` in (326,300,392,428,429,463,465)) LIMIT 0, 4