I have two tables:
products (id,title,price)
types (id,idProduct,type,additionalPrice).
I want to make a list that shows all the products and their subsequent types in the most efficient way possible, basically something like this:
Product1 (price1)
ProductType1 (+x USD)
ProductType2 (+y USD)
Product2 (price2)
ProductType3 (+w USD)
ProductType4 (+z USD)
etc
One solution I can think of is using GROUP_CONCAT and exploding the results in PHP, but something tells me there's got to be a better way.