SELECT a.name, a.alias, a.id, a.image, a.category_alias, a.category_id,a.price,a.price_old,a.discount,
a.new_prd, a.h_price,a.h_price_old,a.summary,a.is_hotdeal,a.date_end,a.date_start,a.promotion_price,
a.link_orther,a.text_old,a.is_renew, a.is_autumn,a.is_card, a.is_installment, a.is_km3,
a.image_sticker_oldprd,a.note_oldprd,a.show_price7, b.fdate,b.tdate, sub.price_1
FROM fs_products AS a
LEFT JOIN fs_sales_categories as b ON a.sale_id = b.id
LEFT JOIN (
SELECT product_id, price_h, price_1
FROM fs_products_sub
WHERE published = 1
GROUP BY product_id, price_h
) as sub ON (a.id = sub.product_id AND a.h_price = sub.price_h)
WHERE (a.category_id_wrapper like '%,847,%' OR a.category_id_wrapper1 like '%,847,%')
AND a.published = 1 AND a.show_cat = 0
ORDER BY a.ordering ASC, a.id DESC SELECT a.name, a.alias, a.id, a.image, a.category_alias, a.category_id,a.price,a.price_old,a.discount,
a.new_prd, a.h_price,a.h_price_old,a.summary,a.is_hotdeal,a.date_end,a.date_start,a.promotion_price,
a.link_orther,a.text_old,a.is_renew, a.is_autumn,a.is_card, a.is_installment, a.is_km3,
a.image_sticker_oldprd,a.note_oldprd,a.show_price7, b.fdate,b.tdate, sub.price_1
FROM fs_products AS a
LEFT JOIN fs_sales_categories as b ON a.sale_id = b.id
LEFT JOIN (
SELECT product_id, price_h, price_1
FROM fs_products_sub
WHERE published = 1
GROUP BY product_id, price_h
) as sub ON (a.id = sub.product_id AND a.h_price = sub.price_h)
WHERE (a.category_id_wrapper like '%,1152,%' OR a.category_id_wrapper1 like '%,1152,%')
AND a.published = 1 AND a.show_cat = 0
ORDER BY a.ordering ASC, a.id DESC SELECT a.name, a.alias, a.id, a.image, a.category_alias, a.category_id,a.price,a.price_old,a.discount,
a.new_prd, a.h_price,a.h_price_old,a.summary,a.is_hotdeal,a.date_end,a.date_start,a.promotion_price,
a.link_orther,a.text_old,a.is_renew, a.is_autumn,a.is_card, a.is_installment, a.is_km3,
a.image_sticker_oldprd,a.note_oldprd,a.show_price7, b.fdate,b.tdate, sub.price_1
FROM fs_products AS a
LEFT JOIN fs_sales_categories as b ON a.sale_id = b.id
LEFT JOIN (
SELECT product_id, price_h, price_1
FROM fs_products_sub
WHERE published = 1
GROUP BY product_id, price_h
) as sub ON (a.id = sub.product_id AND a.h_price = sub.price_h)
WHERE (a.category_id_wrapper like '%,193,%' OR a.category_id_wrapper1 like '%,193,%')
AND a.published = 1 AND a.show_cat = 0
ORDER BY a.ordering ASC, a.id DESC SELECT a.name, a.alias, a.id, a.image, a.category_alias, a.category_id,a.price,a.price_old,a.discount,
a.new_prd, a.h_price,a.h_price_old,a.summary,a.is_hotdeal,a.date_end,a.date_start,a.promotion_price,
a.link_orther,a.text_old,a.is_renew, a.is_autumn,a.is_card, a.is_installment, a.is_km3,
a.image_sticker_oldprd,a.note_oldprd,a.show_price7, b.fdate,b.tdate, sub.price_1
FROM fs_products AS a
LEFT JOIN fs_sales_categories as b ON a.sale_id = b.id
LEFT JOIN (
SELECT product_id, price_h, price_1
FROM fs_products_sub
WHERE published = 1
GROUP BY product_id, price_h
) as sub ON (a.id = sub.product_id AND a.h_price = sub.price_h)
WHERE (a.category_id_wrapper like '%,630,%' OR a.category_id_wrapper1 like '%,630,%')
AND a.published = 1 AND a.show_cat = 0
ORDER BY a.ordering ASC, a.id DESC SELECT a.name, a.alias, a.id, a.image, a.category_alias, a.category_id,a.price,a.price_old,a.discount,
a.new_prd, a.h_price,a.h_price_old,a.summary,a.is_hotdeal,a.date_end,a.date_start,a.promotion_price,
a.link_orther,a.text_old,a.is_renew, a.is_autumn,a.is_card, a.is_installment, a.is_km3,
a.image_sticker_oldprd,a.note_oldprd,a.show_price7, b.fdate,b.tdate, sub.price_1
FROM fs_products AS a
LEFT JOIN fs_sales_categories as b ON a.sale_id = b.id
LEFT JOIN (
SELECT product_id, price_h, price_1
FROM fs_products_sub
WHERE published = 1
GROUP BY product_id, price_h
) as sub ON (a.id = sub.product_id AND a.h_price = sub.price_h)
WHERE (a.category_id_wrapper like '%,338,%' OR a.category_id_wrapper1 like '%,338,%')
AND a.published = 1 AND a.show_cat = 0
ORDER BY a.ordering ASC, a.id DESC SELECT a.name, a.alias, a.id, a.image, a.category_alias, a.category_id,a.price,a.price_old,a.discount,
a.new_prd, a.h_price,a.h_price_old,a.summary,a.is_hotdeal,a.date_end,a.date_start,a.promotion_price,
a.link_orther,a.text_old,a.is_renew, a.is_autumn,a.is_card, a.is_installment, a.is_km3,
a.image_sticker_oldprd,a.note_oldprd,a.show_price7, b.fdate,b.tdate, sub.price_1
FROM fs_products AS a
LEFT JOIN fs_sales_categories as b ON a.sale_id = b.id
LEFT JOIN (
SELECT product_id, price_h, price_1
FROM fs_products_sub
WHERE published = 1
GROUP BY product_id, price_h
) as sub ON (a.id = sub.product_id AND a.h_price = sub.price_h)
WHERE (a.category_id_wrapper like '%,625,%' OR a.category_id_wrapper1 like '%,625,%')
AND a.published = 1 AND a.show_cat = 0
ORDER BY a.ordering ASC, a.id DESC SELECT a.name, a.alias, a.id, a.image, a.category_alias, a.category_id,a.price,a.price_old,a.discount,
a.new_prd, a.h_price,a.h_price_old,a.summary,a.is_hotdeal,a.date_end,a.date_start,a.promotion_price,
a.link_orther,a.text_old,a.is_renew, a.is_autumn,a.is_card, a.is_installment, a.is_km3,
a.image_sticker_oldprd,a.note_oldprd,a.show_price7, b.fdate,b.tdate, sub.price_1
FROM fs_products AS a
LEFT JOIN fs_sales_categories as b ON a.sale_id = b.id
LEFT JOIN (
SELECT product_id, price_h, price_1
FROM fs_products_sub
WHERE published = 1
GROUP BY product_id, price_h
) as sub ON (a.id = sub.product_id AND a.h_price = sub.price_h)
WHERE (a.category_id_wrapper like '%,138,%' OR a.category_id_wrapper1 like '%,138,%')
AND a.published = 1 AND a.show_cat = 0
ORDER BY a.ordering ASC, a.id DESC SELECT a.name, a.alias, a.id, a.image, a.category_alias, a.category_id,a.price,a.price_old,a.discount,
a.new_prd, a.h_price,a.h_price_old,a.summary,a.is_hotdeal,a.date_end,a.date_start,a.promotion_price,
a.link_orther,a.text_old,a.is_renew, a.is_autumn,a.is_card, a.is_installment, a.is_km3,
a.image_sticker_oldprd,a.note_oldprd,a.show_price7, b.fdate,b.tdate, sub.price_1
FROM fs_products AS a
LEFT JOIN fs_sales_categories as b ON a.sale_id = b.id
LEFT JOIN (
SELECT product_id, price_h, price_1
FROM fs_products_sub
WHERE published = 1
GROUP BY product_id, price_h
) as sub ON (a.id = sub.product_id AND a.h_price = sub.price_h)
WHERE (a.category_id_wrapper like '%,246,%' OR a.category_id_wrapper1 like '%,246,%')
AND a.published = 1 AND a.show_cat = 0
ORDER BY a.ordering ASC, a.id DESC SELECT a.name, a.alias, a.id, a.image, a.category_alias, a.category_id,a.price,a.price_old,a.discount,
a.new_prd, a.h_price,a.h_price_old,a.summary,a.is_hotdeal,a.date_end,a.date_start,a.promotion_price,
a.link_orther,a.text_old,a.is_renew, a.is_autumn,a.is_card, a.is_installment, a.is_km3,
a.image_sticker_oldprd,a.note_oldprd,a.show_price7, b.fdate,b.tdate, sub.price_1
FROM fs_products AS a
LEFT JOIN fs_sales_categories as b ON a.sale_id = b.id
LEFT JOIN (
SELECT product_id, price_h, price_1
FROM fs_products_sub
WHERE published = 1
GROUP BY product_id, price_h
) as sub ON (a.id = sub.product_id AND a.h_price = sub.price_h)
WHERE (a.category_id_wrapper like '%,142,%' OR a.category_id_wrapper1 like '%,142,%')
AND a.published = 1 AND a.show_cat = 0
ORDER BY a.ordering ASC, a.id DESC SELECT a.name, a.alias, a.id, a.image, a.category_alias, a.category_id,a.price,a.price_old,a.discount,
a.new_prd, a.h_price,a.h_price_old,a.summary,a.is_hotdeal,a.date_end,a.date_start,a.promotion_price,
a.link_orther,a.text_old,a.is_renew, a.is_autumn,a.is_card, a.is_installment, a.is_km3,
a.image_sticker_oldprd,a.note_oldprd,a.show_price7, b.fdate,b.tdate, sub.price_1
FROM fs_products AS a
LEFT JOIN fs_sales_categories as b ON a.sale_id = b.id
LEFT JOIN (
SELECT product_id, price_h, price_1
FROM fs_products_sub
WHERE published = 1
GROUP BY product_id, price_h
) as sub ON (a.id = sub.product_id AND a.h_price = sub.price_h)
WHERE (a.category_id_wrapper like '%,191,%' OR a.category_id_wrapper1 like '%,191,%')
AND a.published = 1 AND a.show_cat = 0
ORDER BY a.ordering ASC, a.id DESC SELECT a.name, a.alias, a.id, a.image, a.category_alias, a.category_id,a.price,a.price_old,a.discount,
a.new_prd, a.h_price,a.h_price_old,a.summary,a.is_hotdeal,a.date_end,a.date_start,a.promotion_price,
a.link_orther,a.text_old,a.is_renew, a.is_autumn,a.is_card, a.is_installment, a.is_km3,
a.image_sticker_oldprd,a.note_oldprd,a.show_price7, b.fdate,b.tdate, sub.price_1
FROM fs_products AS a
LEFT JOIN fs_sales_categories as b ON a.sale_id = b.id
LEFT JOIN (
SELECT product_id, price_h, price_1
FROM fs_products_sub
WHERE published = 1
GROUP BY product_id, price_h
) as sub ON (a.id = sub.product_id AND a.h_price = sub.price_h)
WHERE (a.category_id_wrapper like '%,141,%' OR a.category_id_wrapper1 like '%,141,%')
AND a.published = 1 AND a.show_cat = 0
ORDER BY a.ordering ASC, a.id DESC SELECT a.name, a.alias, a.id, a.image, a.category_alias, a.category_id,a.price,a.price_old,a.discount,
a.new_prd, a.h_price,a.h_price_old,a.summary,a.is_hotdeal,a.date_end,a.date_start,a.promotion_price,
a.link_orther,a.text_old,a.is_renew, a.is_autumn,a.is_card, a.is_installment, a.is_km3,
a.image_sticker_oldprd,a.note_oldprd,a.show_price7, b.fdate,b.tdate, sub.price_1
FROM fs_products AS a
LEFT JOIN fs_sales_categories as b ON a.sale_id = b.id
LEFT JOIN (
SELECT product_id, price_h, price_1
FROM fs_products_sub
WHERE published = 1
GROUP BY product_id, price_h
) as sub ON (a.id = sub.product_id AND a.h_price = sub.price_h)
WHERE (a.category_id_wrapper like '%,139,%' OR a.category_id_wrapper1 like '%,139,%')
AND a.published = 1 AND a.show_cat = 0
ORDER BY a.ordering ASC, a.id DESC SELECT a.name, a.alias, a.id, a.image, a.category_alias, a.category_id,a.price,a.price_old,a.discount,
a.new_prd, a.h_price,a.h_price_old,a.summary,a.is_hotdeal,a.date_end,a.date_start,a.promotion_price,
a.link_orther,a.text_old,a.is_renew, a.is_autumn,a.is_card, a.is_installment, a.is_km3,
a.image_sticker_oldprd,a.note_oldprd,a.show_price7, b.fdate,b.tdate, sub.price_1
FROM fs_products AS a
LEFT JOIN fs_sales_categories as b ON a.sale_id = b.id
LEFT JOIN (
SELECT product_id, price_h, price_1
FROM fs_products_sub
WHERE published = 1
GROUP BY product_id, price_h
) as sub ON (a.id = sub.product_id AND a.h_price = sub.price_h)
WHERE (a.category_id_wrapper like '%,293,%' OR a.category_id_wrapper1 like '%,293,%')
AND a.published = 1 AND a.show_cat = 0
ORDER BY a.ordering ASC, a.id DESC SELECT a.name, a.alias, a.id, a.image, a.category_alias, a.category_id,a.price,a.price_old,a.discount,
a.new_prd, a.h_price,a.h_price_old,a.summary,a.is_hotdeal,a.date_end,a.date_start,a.promotion_price,
a.link_orther,a.text_old,a.is_renew, a.is_autumn,a.is_card, a.is_installment, a.is_km3,
a.image_sticker_oldprd,a.note_oldprd,a.show_price7, b.fdate,b.tdate, sub.price_1
FROM fs_products AS a
LEFT JOIN fs_sales_categories as b ON a.sale_id = b.id
LEFT JOIN (
SELECT product_id, price_h, price_1
FROM fs_products_sub
WHERE published = 1
GROUP BY product_id, price_h
) as sub ON (a.id = sub.product_id AND a.h_price = sub.price_h)
WHERE (a.category_id_wrapper like '%,240,%' OR a.category_id_wrapper1 like '%,240,%')
AND a.published = 1 AND a.show_cat = 0
ORDER BY a.ordering ASC, a.id DESC SELECT a.name, a.alias, a.id, a.image, a.category_alias, a.category_id,a.price,a.price_old,a.discount,
a.new_prd, a.h_price,a.h_price_old,a.summary,a.is_hotdeal,a.date_end,a.date_start,a.promotion_price,
a.link_orther,a.text_old,a.is_renew, a.is_autumn,a.is_card, a.is_installment, a.is_km3,
a.image_sticker_oldprd,a.note_oldprd,a.show_price7, b.fdate,b.tdate, sub.price_1
FROM fs_products AS a
LEFT JOIN fs_sales_categories as b ON a.sale_id = b.id
LEFT JOIN (
SELECT product_id, price_h, price_1
FROM fs_products_sub
WHERE published = 1
GROUP BY product_id, price_h
) as sub ON (a.id = sub.product_id AND a.h_price = sub.price_h)
WHERE (a.category_id_wrapper like '%,1004,%' OR a.category_id_wrapper1 like '%,1004,%')
AND a.published = 1 AND a.show_cat = 0
ORDER BY a.ordering ASC, a.id DESC SELECT a.name, a.alias, a.id, a.image, a.category_alias, a.category_id,a.price,a.price_old,a.discount,
a.new_prd, a.h_price,a.h_price_old,a.summary,a.is_hotdeal,a.date_end,a.date_start,a.promotion_price,
a.link_orther,a.text_old,a.is_renew, a.is_autumn,a.is_card, a.is_installment, a.is_km3,
a.image_sticker_oldprd,a.note_oldprd,a.show_price7, b.fdate,b.tdate, sub.price_1
FROM fs_products AS a
LEFT JOIN fs_sales_categories as b ON a.sale_id = b.id
LEFT JOIN (
SELECT product_id, price_h, price_1
FROM fs_products_sub
WHERE published = 1
GROUP BY product_id, price_h
) as sub ON (a.id = sub.product_id AND a.h_price = sub.price_h)
WHERE (a.category_id_wrapper like '%,192,%' OR a.category_id_wrapper1 like '%,192,%')
AND a.published = 1 AND a.show_cat = 0
ORDER BY a.ordering ASC, a.id DESC