There is the following table structure.
**Products:** -id -title -price **Equipments** -id -title **Eqvalues** -id -equipment_id -value **Equipment_product_value** -id -product_id -equipment_id -value_id I want to display data in a format.
|products.title|products.price|equipments.title-1|eqvalues.value-1|equipments.title-N|eqvalues.value-N In simple words, a product has characteristics (equipments) and the values of these characteristics (values) to be output. Is it possible to do so. My part of the implementation:
SELECT products.id, products.title, products.status, products.price, products.info, product_photo.filename, equipments.title AS etitle, values.value FROM products INNER JOIN product_photo ON products.id = product_photo.product_id INNER JOIN equipment_product ON products.id = equipment_product.product_id INNER JOIN equipments ON equipment_product.equipment_id = equipments.id INNER JOIN `values` ON equipment_product.value_id = values.id GROUP BY products.id