SQL: SELECT
image2.*,
COALESCE(product_lang.title, product_lang.title) AS title
FROM image
INNER JOIN image AS image2 ON image2.id_product = image.id_product
INNER JOIN product ON product.id = image.id_product
LEFT JOIN product_lang ON product_lang.id_product = product.id AND product_lang.id_lang = 1
LEFT JOIN product_lang AS product_lang_alt ON product_lang.id_lang IS NULL AND product_lang_alt.id_product = product.id AND product_lang_alt.id_lang = 1
WHERE image.id =