- 001
- 002
- 003
- 004
- 005
- 006
- 007
- 008
- 009
- 010
- 011
- 012
- 013
- 014
- 015
- 016
- 017
- 018
- 019
- 020
- 021
- 022
- 023
- 024
- 025
- 026
- 027
- 028
- 029
- 030
- 031
- 032
- 033
- 034
- 035
- 036
- 037
- 038
- 039
- 040
- 041
- 042
- 043
- 044
- 045
- 046
- 047
- 048
- 049
- 050
- 051
- 052
- 053
- 054
- 055
- 056
- 057
- 058
- 059
- 060
- 061
- 062
- 063
- 064
- 065
- 066
- 067
- 068
- 069
- 070
- 071
- 072
- 073
- 074
- 075
- 076
- 077
- 078
- 079
- 080
- 081
- 082
- 083
- 084
- 085
- 086
- 087
- 088
- 089
- 090
- 091
- 092
- 093
- 094
- 095
- 096
- 097
- 098
- 099
- 100
SELECT
'X' `TYPEOF`
,161 AS `ID`
,pa.ARTICUL
,p.PRODUCT_NAME
,p.PRODUCT_INSTRUCTION
,p.PRODUCT_WEIGHT
,p.PRODUCT_VOLUME
,p.PRODUCT_RATING
,pm.MEASURE
,b.BRAND_NAME
,cs.COLL_NAME COLLECTION
,m.MAN_NAME MANUFACTORER
,pst.QUANTITY
,p.TIMESTAMP_X AS LAST_MODIFY
,pts.PRODUCT_NOTE
,pts.PRODUCT_DESCRIPTION
,pts.PRODUCT_IMAGE
,pts.PRODUCT_GALLERY
,pts.PRODUCT_ACTIVE
,pts.PRODUCT_ACTIVE_FROM
,pts.PRODUCT_ACTIVE_TO
,pts.PRODUCT_NEW
,pts.PRODUCT_LEADER
,pts.USER_ID
,pts.SITE_ID
,'X' CATEGORIES
,'X' FEATURES
,'X' RANGE_APPLICATION
,'X' RANGE_PRESCRIPTION
,'X' PRODUCT_PRICE
,'X' PRICE_CURRENCY
,'X' PRODUCT_PRICE_GROUP
,'X' IMAGES
FROM `e_products` `p`
LEFT JOIN `e_product_to_site` `pts` ON ((`pts`.`PRODUCT_ID`=161))
LEFT JOIN `e_product_articuls` `pa` ON ((`pa`.`PRODUCT_ID`=161))
LEFT JOIN `e_product_stock` `pst` ON ((`pst`.`PRODUCT_ID`=161))
LEFT JOIN `e_product_to_brand` `ptb` ON ((`ptb`.`BRAND_ID`=161))
LEFT JOIN `e_product_to_collection` `pcl` ON ((`pcl`.`PRODUCT_ID` = 161))
LEFT JOIN `e_product_measure` `pm` ON ((`p`.`PRODUCT_MEASURE` = `pm`.`ID`))
LEFT JOIN `e_brands` `b` ON ((`ptb`.`BRAND_ID`=`b`.`ID`))
LEFT JOIN `e_manufactorers` `m` ON ((`b`.`MAN_ID`=`m`.`ID`))
LEFT JOIN `e_collections` `cs` ON ((`cs`.`ID`=`pcl`.`COLLECTION_ID`))
LEFT JOIN `e_product_prices` `pp` ON ((`pp`.`PRODUCT_ID`=`p`.`ID`))
WHERE `p`.`ID` IN (161) AND `pts`.`SITE_ID` LIKE 's0'
UNION
SELECT 'categories',`p`.`ID` AS `ID`
,'X','X','X','X','X','X','X','X','X','X','X','X'
,'X','X','X','X','X','X','X','X','X','X','X'
,`ptc`.`CATEGORY_ID`
,'X','X','X','X','X','X','X'
FROM `e_product_to_category` `ptc`
LEFT JOIN `e_products` `p` ON ((`p`.`ID`=`ptc`.`PRODUCT_ID`))
LEFT JOIN `e_product_categories` `pc` ON ((`pc`.`ID`=`ptc`.`CATEGORY_ID`))
LEFT JOIN `e_catalogs` `c` ON ((`c`.`ID`=`pc`.`CATALOG_ID`))
WHERE `ptc`.`PRODUCT_ID` IN (161)
AND `c`.`SITE_ID` LIKE 's0'
UNION
SELECT 'features',`p`.`ID` AS `ID`
,'X','X','X','X','X','X','X','X','X','X','X','X'
,'X','X','X','X','X','X','X','X','X','X','X'
,'X'
,FEATURE_ID
,'X','X','X','X','X','X'
FROM `e_product_catalog` `pc`
LEFT JOIN `e_products` `p` ON `p`.`ID`=`pc`.`PRODUCT_ID`
LEFT JOIN `e_product_to_category` `ptc` ON ((`ptc`.`PRODUCT_ID`=`pc`.`PRODUCT_ID`))
LEFT JOIN `e_catalogs` `c` ON ((`c`.`ID`=`ptc`.`CATEGORY_ID`))
WHERE `pc`.`PRODUCT_ID` IN (161) AND `c`.`SITE_ID` LIKE 's0'
UNION
SELECT 'rangeapp',`p`.`ID` AS `ID`
,'X','X','X','X','X','X','X','X','X','X','X','X'
,'X','X','X','X','X','X','X','X','X','X','X'
,'X','X'
,`RANGE_APP_ID`
,'X' ,'X','X','X','X'
FROM `e_product_range_app` `pra`
LEFT JOIN `e_products` `p` ON `p`.`ID`=`pra`.`PRODUCT_ID`
WHERE `PRODUCT_ID` IN (161)
UNION
SELECT 'rangepre',`p`.`ID` AS `ID`
,'X','X','X','X','X','X','X','X','X','X','X','X'
,'X','X','X','X','X','X','X','X','X','X','X'
,'X','X','X'
,`RANGE_PRE_ID`,'X','X','X','X'
FROM `e_product_range_pre` `prp`
LEFT JOIN `e_products` `p` ON `p`.`ID`=`prp`.`PRODUCT_ID`
WHERE `PRODUCT_ID` IN (161)
UNION
SELECT 'prices',`p`.`ID` AS `ID`
,'X','X','X','X','X','X','X','X','X','X','X','X'