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 (
313162, 313163, 313164, 313165, 313166,
313167, 313168, 313169, 313170, 313171,
313172, 313173, 313174, 313175, 313176,
313177, 313178, 313179, 313180, 313181,
313182, 313183, 313184, 313185, 313186,
313187, 313188, 313189, 313190, 313191,
313192, 313193, 313194, 313195, 313196,
313197, 313198, 313199, 313200, 313201,
313202, 313203, 313204, 313205, 313206,
313207, 313208, 313209, 313210, 313211,
313212, 313213, 313214, 313215, 313216,
313217, 313218, 313219, 313220, 313221,
313222, 313223, 313224, 313225, 313226,
313227, 313228, 313229, 313230, 312934,
313010, 313019, 313020, 313021, 313022,
313023, 313024, 313025, 313026, 313027,
313028, 313011, 313029, 313030, 313031,
313032, 313033, 313034, 313035, 313036,
313037, 313038, 313012, 313039, 313040,
313041
)
AND a.status = 'A'
ORDER BY
a.position