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 (
96322,
96323,
96510,
96511,
96526,
96527,
96528,
96529,
96530,
96531,
96538,
96539,
96552,
96553,
96554,
96555,
96556,
96557,
96558,
96559,
96560,
96561,
96562,
96563,
96564,
96565,
96566,
96567,
96596,
96597,
96622,
96623,
96634,
96635,
96766,
96767,
96768,
96769,
96774,
96775,
96818,
96819,
96820,
96821,
96822,
96823,
96824,
96825,
96858,
96859,
96896,
96897,
96902,
96903,
96912,
96913,
97024,
97025,
97032,
97033,
97136,
97137,
97138,
97139,
97140,
97141,
97166,
97167,
97168,
97169,
97170,
97171,
97260,
97261,
97340,
97341,
97342,
97343,
97346,
97347,
97350,
97351,
97352,
97353,
97426,
97427,
97432,
97433,
97434,
97435,
97436,
97437,
97438,
97439,
97700,
97701,
97702,
97703,
97704,
97705,
97706,
97707,
97708,
97709,
97710,
97711,
97712,
97713,
97714,
97715,
97716,
97717,
97718,
97719,
97720,
97721,
97722,
97723,
97724,
97725,
97726,
97727,
97728,
97729,
97730,
97731,
97732,
97733,
97734,
97735,
97736,
97737,
97738,
97739,
97740,
97741,
97742,
97743,
97744,
97745,
97800,
97801,
97802,
97803,
97804,
97805,
97806,
97807,
97808,
97809,
97810,
97811,
97812,
97813,
97814,
97815,
97816,
97817,
97818,
97819
)
ORDER BY
cscart_images_links.position,
cscart_images_links.pair_id