Oh man, I just can’t figure out how to write this query.
Any guidance will be highly appreciated.
I have the following tables:
title (e.g. position, design)
name (e.g. left, right)
name (e.g. headlights)
I want to fetch all the products where
dataEntryUserId = X
dateOfEntry = Y
Which is simple to do with
SELECT * FROM products WHERE dataEntryUserId = "X" AND dateOfEntry = "Y"
But I just can’t figure out how to get the following output
Product Name: Headlight
Specifications: Position (Left), Position (Right)
I am just wondering if this can be done in SQL or do I have to somehow use PHP to store the results of multiple INNER JOIN queries and output it in the final table (which I also can’t figure out).
Can you kindly assist?