Ask YC: SQL Help ! (feel free to ignore)
I've recently decided to take up programming and find it to be great fun. (I've always been the biz and ideas guy) However, I've run into a problem that I can't quite figure out. I've tried different forums, asking people, etc. but nobody seems able to help.
Anyway here's the question:
I have three tables in a mySQL db: list, labels, and content.
The idea is to be able to create a matrix with entries from list along one axis, entries from labels along another axis, and entries from content as the intersection of the two. The content table has a field that corresponds to a field in labels, and a field that corresponds to a field in list so that I am able to place it correctly in the matrix.
Now i want to do a SQL query that returns an array with items from the content table, ordered on the X axis by fields in the list table, and ordered on the y axis by fields in the labels table.
The reason for wanting to do this is that I want to create a number of HTML tables with columns that will change, and are not the same for all HTML tables.
And again: sorry if this post is inappropriate. I hope I have enough karma for someone to bother helping me out.
Links, clues etc. would be great. I don't mind figuring stuff out for myself.
Help me Obi-wan Kanobi - you're my only hope....