Not sure how to do this. The query doesn't need to be executed quickly...it's for a sphinx index...but it needs to include all the data for searching.
Here's the table structure:
person
- main_id
- name
person_attritubes
- attribute_id
- name (example: hair, eyes, height)
person_details
- main_id
- attribute_id
- value (example: blond, brown, blue, green, 5'6", 6'5")
How do I get all the person_attritubes.name as columns and the person_details.value as the rows for those columns in one query?