My SQL statement looks like
SELECT beds.id,beds.name,beds.brand,beds.price,beds.disprice,feature.feature AS feature
FROM beds,feature,bedFeatures
WHERE bedFeatures.featureID = feature.id AND bedFeatures.bedID = beds.id
I get this result
id name brand price disprice feature
10 Big Sleeper ZZZZ 10000 1 Oak
10 Big Sleeper ZZZZ 10000 1 Ash
10 Big Sleeper ZZZZ 10000 1 White
What I want is for the AS to give each feature a unique name such as feature1 feature2 feature3 so those 4 lines are displyaed in one. Is this possible?
The output I am looking for would look something like
id name brand price disprice feature1 feature2 feature3
10 Big Sleeper zzzz 1000 1 Oak Ash White