SELECT*FROMfh40d_hikashop_discountWHERE discount_type='discount' AND discount_published=1 AND ( discount_quota>discount_used_times OR discount_quota=0 ) AND discount_start < 1542668135 AND ( discount_end > 1542668135 OR discount_end = 0 ) AND ( (discount_product_id IN ('','0','33','32','30','26')) OR (discount_product_id LIKE '%,33,%') OR (discount_product_id LIKE '%,32,%') OR (discount_product_id LIKE '%,30,%') OR (discount_product_id LIKE '%,26,%') ) AND ( discount_flat_amount != 0 OR discount_percent_amount != 0 )

SELECT a.*FROMfh40d_hikashop_priceAS a WHERE a.price_product_id IN (33,32,30,26) AND a.price_currency_id IN (1,2) AND (a.price_access = 'all' OR a.price_access LIKE '%,9,%' ORISNULL(a.price_access)) ORDERBY a.price_site_id ASC, a.price_value DESC

SELECT a.*FROMfh40d_hikashop_badgeAS a WHERE a.badge_start <= 1542668135 AND ( a.badge_end >= 1542668135 OR a.badge_end =0 ) AND a.badge_published=1 AND (a.badge_quantity='' OR a.badge_quantity=-1) AND (badge_discount_id='0' OR badge_discount_id='') AND ((badge_category_childs = 0 AND (badge_category_id = '0' OR badge_category_id = '' OR badge_category_id = '2' OR badge_category_id LIKE '%,2,%' OR badge_category_id = '13' OR badge_category_id LIKE '%,13,%')) OR (badge_category_childs = 1 AND (badge_category_id='0' OR badge_category_id='' OR badge_category_id = '1' OR badge_category_id LIKE '%,1,%' OR badge_category_id = '2' OR badge_category_id LIKE '%,2,%' OR badge_category_id = '13' OR badge_category_id LIKE '%,13,%'))) ORDERBY a.badge_ordering ASC,a.badge_id ASC