SELECT
a.*,
b.option_name,
b.internal_option_name,
b.option_text,
b.description,
b.inner_hint,
b.incorrect_message,
b.comment
FROM
cscart_product_options as a
LEFT JOIN cscart_product_options_descriptions as b ON a.option_id = b.option_id
AND b.lang_code = 'ar'
WHERE
a.product_id IN (
312881, 312873, 312841, 312842, 312847,
312848, 312840, 312846, 312838, 312839,
312854, 312876, 312843, 312845, 312837,
312855, 312834, 312864, 312852, 312853,
312851, 312866, 312844, 312867, 312862,
312833, 312835, 312856, 312857, 312859,
312860, 312861, 312872, 312869, 312858,
312863, 312879, 312875, 312878, 312836,
312880, 312865, 312874, 312868, 312849,
312850, 312877
)
AND a.status = 'A'
ORDER BY
a.position