How to SELECT multiple tables and JOIN multiple rows from the same column?
It does not return painting.id_group
, painting.id_type
and pai
You can join to same table multiple times you just need to give different aliases
SELECT painting.id,
painting.order,
painting_en.url,
`group`.en AS `group`,
TYPE.en AS type,
location.en AS location
FROM painting
LEFT JOIN painting_en
USING (id)
LEFT JOIN id_portfolio `group`
ON `group`.id = painting.id_group
LEFT JOIN id_portfolio TYPE
ON TYPE.id = painting.id_type
LEFT JOIN id_portfolio location
ON location.id = painting.id_location
WHERE painting_en.url = '2011-name3'
LIMIT 1