Answer the question
In order to leave comments, you need to log in
How to merge the selection obtained from JOIN?
I have the following query in the database:
SELECT
`prod`.`name`,
`prod`.`price`,
`atr`.`nameAttribute`,
`val`.`attributeValue`
FROM `products` as `prod`
LEFT JOIN `productAttribute` as `atr` ON `prod`.`idProduct` = `atr`.`idProduct`
LEFT JOIN `attributeValue` as `val` ON `atr`.`idAttribute` = `val`.`idAttribute`
WHERE `prod`.`idCategory` = 1
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question