SELECT product.product_id AS product_id ,min(product_spec.product_spec_id) AS product_spec_id ,min(product_spec.ean) AS ean ,max(product_info.product_name) AS product_name ,max(producer_info.producer_name) AS producer_name ,max(product_info.short_info) AS short_info ,max(product_info.long_info) AS long_info ,max(style_info.style_name) AS druh_zbozi ,min(product_info2.a159) AS obj_cislo ,min(product_info2.a161) AS akcni_cena ,min(fotr.category_id) AS category_id ,max(fotr.shop_id_up) AS fotr_id_up ,max((product_spec.row * (1 + product_spec.dph))) as cena_s_dph ,min((product_spec.row * (1 + product_spec.dph)*(1 - product_spec.sleva / 100))) as cena_se_slevou ,max(product_spec.sleva) as sleva ,min(product_media.media_id) AS media_id ,max(store_central.units) AS units ,min(product_info.language_id) AS language FROM product JOIN product_info ON product_info.product_id = product.product_id AND product_info.language_id = 1 JOIN product_info2 ON product_info2.product_id = product.product_id AND product_info2.language_id = 1 JOIN product_spec ON product_spec.product_id = product.product_id AND product_spec.product_spec_id = ? AND product_spec.row != 0 JOIN style_info ON style_info.style_id = product.style_id AND style_info.language_id = 1 JOIN product_category ON product_category.product_id = product.product_id JOIN product_media ON product_media.product_id = product.product_id JOIN shop_category as kluk ON kluk.category_id = product_category.category_id AND kluk.shop_id = 73 JOIN shop_category as fotr ON fotr.category_id = kluk.shop_id_up AND fotr.shop_id = 73 LEFT JOIN shop_category as dedek ON dedek.category_id = fotr.shop_id_up AND dedek.shop_id = 73 JOIN producer_info ON producer_info.producer_id = product.producer_id JOIN store_central ON store_central.product_spec_id = product_spec.product_spec_id LEFT JOIN product_notshow_2 ON product_notshow_2.product_spec_id = product_spec.product_spec_id WHERE product.product_id = ? GROUP BY product.product_id


738322945
629481755


object(stdClass)#7 (18) {
  ["product_id"]=>
  int(629481755)
  ["product_spec_id"]=>
  int(738322945)
  ["ean"]=>
  string(13) "8592772079299"
  ["product_name"]=>
  string(65) "Ski Gog. 921 MDAVZSFO, black matt, amber2-3, silver mirror, photo"
  ["producer_name"]=>
  string(8) "blizzard"
  ["short_info"]=>
  string(0) ""
  ["long_info"]=>
  string(0) ""
  ["druh_zbozi"]=>
  string(18) "lyžařské brýle"
  ["obj_cislo"]=>
  string(6) "921310"
  ["akcni_cena"]=>
  string(1) "1"
  ["category_id"]=>
  int(336647754)
  ["fotr_id_up"]=>
  int(418756846)
  ["cena_s_dph"]=>
  string(17) "1299.000000000043"
  ["cena_se_slevou"]=>
  string(36) "909.00000000002631006928406454000000"
  ["sleva"]=>
  string(15) "30.023094688222"
  ["media_id"]=>
  int(147973831)
  ["units"]=>
  int(22)
  ["language"]=>
  int(1)
}