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 = 'pl'
WHERE
a.product_id IN (
2187, 2260, 1861, 1747, 1780, 1797, 1823,
1782, 1798, 1772, 1755, 2028, 2118,
2116, 2117, 1966, 1967, 1965, 2026,
2027, 2131, 1938, 2025, 2062, 2369,
1856, 2205, 1846, 1885, 1873, 1824,
1869, 2004, 2140, 2139, 2141, 2150,
1935, 2003, 2007, 2076, 1867, 2029,
2361, 1825, 1826, 2390, 2391, 2270,
2272, 2273, 2308, 2378, 2220, 2022,
2015, 1980, 1976, 1927, 2058, 1975,
1964, 2136, 1749, 1973, 2339, 1974,
2354, 1972, 2352, 2030, 2269, 2289,
2167, 2128, 1968, 1969, 2192, 2297,
2037
)
AND a.status = 'A'
ORDER BY
a.position