SELECT
cscart_images.*,
cscart_images_links.*,
cscart_common_descriptions.description AS alt,
cscart_images.image_id AS images_image_id
FROM
cscart_images_links
LEFT JOIN cscart_images ON cscart_images_links.detailed_id = cscart_images.image_id
LEFT JOIN cscart_common_descriptions ON cscart_common_descriptions.object_id = cscart_images.image_id
AND cscart_common_descriptions.object_holder = 'images'
AND cscart_common_descriptions.lang_code = 'en'
WHERE
cscart_images_links.object_type = 'variant_image'
AND cscart_images_links.type = 'V'
AND cscart_images_links.object_id IN (
104298,
104299,
104378,
104379,
104402,
104403,
104406,
104407,
104418,
104419,
104422,
104423,
104424,
104425,
104426,
104427,
104428,
104429,
104430,
104431,
104440,
104441,
104442,
104443,
104444,
104445,
104446,
104447,
104448,
104449,
104450,
104451,
104534,
104535,
104536,
104537,
104538,
104539,
104540,
104541,
104566,
104567,
104568,
104569,
104570,
104571,
104576,
104577,
104578,
104579,
104614,
104615,
104628,
104629,
104658,
104659,
104660,
104661,
104662,
104663,
104664,
104665,
104666,
104667,
104668,
104669,
104686,
104687,
104688,
104689,
104722,
104723,
104728,
104729,
104738,
104739,
104814,
104815,
104816,
104817,
104818,
104819,
104820,
104821,
104822,
104823,
104824,
104825,
104826,
104827,
104828,
104829,
104830,
104831,
104832,
104833,
104834,
104835,
104836,
104837,
104838,
104839,
104840,
104841,
104842,
104843,
104856,
104857,
104858,
104859,
104902,
104903,
105094,
105095,
105096,
105097,
105098,
105099,
105108,
105109,
105126,
105127,
105128,
105129,
105130,
105131,
105186,
105187,
105188,
105189,
105190,
105191,
105192,
105193,
105194,
105195,
105196,
105197,
105198,
105199,
105200,
105201,
105202,
105203,
105204,
105205,
105206,
105207,
105426,
105427,
105676,
105677,
163494,
163495,
163496,
163497,
163498,
163499,
163500,
163501
)
ORDER BY
cscart_images_links.position,
cscart_images_links.pair_id