Пеленки для детей
Производитель: Татошка (Украина)
Производитель: Руно (Украина)
DROP TEMPORARY TABLE IF EXISTS tmp_base_goods;
CREATE TEMPORARY TABLE tmp_base_goods (
id INT NOT NULL PRIMARY KEY,
brand_id INT,
price DECIMAL(10,2),
old_price DECIMAL(10,2),
ordr INT,
is_present TINYINT(1),
sub_icon_id INT,
fast_delivery TINYINT(1),
is_new TINYINT(1),
is_sale TINYINT(1),
KEY idx_brand (brand_id)
) ENGINE=MEMORY [0.0003359317779541 sec]
INSERT INTO tmp_base_goods
(id, brand_id, price, old_price, ordr, is_present, sub_icon_id, fast_delivery, is_new, is_sale)
SELECT g.id, g.brand_id, g.price, g.old_price, g.ordr, g.is_present,
g.sub_icon_id, g.fast_delivery, g.is_new, g.is_sale
FROM pod_cat_good g
WHERE g.cat_id IN (1050) AND g.entry=0 AND g.is_active AND g.is_present_all_mods
UNION
SELECT g.id, g.brand_id, g.price, g.old_price, g.ordr, g.is_present,
g.sub_icon_id, g.fast_delivery, g.is_new, g.is_sale
FROM pod_cat_good g
INNER JOIN pod_dop_cat_category dc ON dc.good_id = g.id
WHERE dc.dop_cat_id IN (1050) AND g.entry=0 AND g.is_active AND g.is_present_all_mods [0.096912145614624 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_sub_goods;
CREATE TEMPORARY TABLE tmp_sub_goods (
id INT NOT NULL PRIMARY KEY,
entry INT NOT NULL,
price DECIMAL(10,2),
old_price DECIMAL(10,2),
sub_icon_id INT,
is_present TINYINT(1),
fast_delivery TINYINT(1),
is_new TINYINT(1),
is_sale TINYINT(1),
KEY idx_entry (entry)
) ENGINE=MEMORY [0.00024700164794922 sec]
INSERT INTO tmp_sub_goods
(id, entry, price, old_price, sub_icon_id, is_present, fast_delivery, is_new, is_sale)
SELECT go.id, go.entry, go.price, go.old_price, go.sub_icon_id, go.is_present,
go.fast_delivery, go.is_new, go.is_sale
FROM pod_cat_good go
INNER JOIN tmp_base_goods t ON go.entry = t.id
WHERE go.is_active AND go.is_present [0.0004730224609375 sec]
DROP TEMPORARY TABLE IF EXISTS tmp_base_goods;
DROP TEMPORARY TABLE IF EXISTS tmp_sub_goods [0.00017619132995605 sec]
DEVELOPMENT🌷СКИДКИ ДО 70%
ПЕРЕЙТИ
Производитель: Татошка (Украина)
Производитель: Руно (Украина)