1045 -

SELECT p.products_id, EXISTS(SELECT pav.* FROM products_attributes_vendors pav WHERE pav.products_id = p.products_id) AS has_vendor_options, EXISTS(SELECT pa.* FROM products_attributes pa WHERE pa.products_id = p.products_id) AS has_options, p.products_status, p.products_model, p.associated_part_number_1, p.associated_part_number_2, p.associated_part_number_3, p.associated_part_number_4, p.products_quantity, p.products_image, p.products_image_med, p.products_image_lrg, p.products_image_xl_1, p.products_image_xl_2, p.products_image_xl_3, p.products_image_xl_4, p.products_image_xl_5, p.products_image_xl_6, p.products_image_xl_7, p.products_image_xl_8, p.products_image_xl_9, p.products_image_xl_10, p.products_image_xl_11, p.products_image_xl_12, p.products_image_xl_13, p.products_image_xl_14, p.products_image_xl_15, p.products_image_xl_16, p.products_image_xl_17, p.products_image_xl_18, p.products_image_xl_19, p.products_date_added, p.products_last_modified, p.last_edited_by, p.products_price, p.products_price1, p.products_price2, p.products_price3, p.products_price4, p.products_price5, p.products_price6, p.products_price7, p.products_price8, p.products_price9, p.products_price10, p.products_price11, p.products_price1_qty, p.products_price2_qty, p.products_price3_qty, p.products_price4_qty, p.products_price5_qty, p.products_price6_qty, p.products_price7_qty, p.products_price8_qty, p.products_price9_qty, p.products_price10_qty, p.products_price11_qty, p.jobber_price, p.map_price, p.vendors_cost, p.imported_by, p.products_qty_blocks, p.products_tax_class_id, p.pkg_length, p.pkg_width, p.pkg_height, p.products_weight, p.products_types_id, p.wheel_app_image, p.enable_wheel_set_builder, p.disabled_redirect_url, p.allow_in_cart, pd.products_name, pd.products_description, pd.endorsement_text, pd.bottom_text, pd.products_call_best_price, pd.products_url, m.manufacturers_id, m.manufacturers_name, m.manufactures_call_best_price, hep.reference_id as helloExtendReferenceId, hep.enabled as helloExtendEnable, hep.approved as helloExtendApproved, pv.size, pv.color, pv.parent_id, IF(s.status, s.specials_new_products_price, NULL) AS specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) AS final_price, mfs.free_shipping AS manufacturers_free_shipping, fs.free_shipping AS products_free_shipping, CASE WHEN c.parent_id = 8127 THEN 1 ELSE 0 END AS is_clearance, v.vendors_id, v.vendors_name FROM products p INNER JOIN products_description pd ON pd.products_id = p.products_id LEFT JOIN manufacturers m ON m.manufacturers_id = p.manufacturers_id LEFT JOIN vendors v ON v.vendors_id = p.vendors_id LEFT JOIN specials s ON s.products_id = p.products_id LEFT JOIN free_shipping fs ON fs.products_id = p.products_id LEFT JOIN manufacturers_free_shipping mfs ON mfs.manufacturers_id = p.manufacturers_id LEFT JOIN products_variants pv ON pv.products_id = p.products_id LEFT JOIN hello_extend_products hep ON hep.products_id = p.products_id LEFT JOIN products_to_categories ptc ON ptc.products_id = p.products_id LEFT JOIN categories c ON c.categories_id = ptc.categories_id WHERE p.products_id IN (154137949,154137950,154137951,154137947,154137943,154137952,154137948,154137944,154137953,154137945,154137946) ORDER BY field(p.products_id, 154137949,154137950,154137951,154137947,154137943,154137952,154137948,154137944,154137953,154137945,154137946)

[TEP STOP]