Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask YC: SQL Help ! (feel free to ignore)
2 points by mixmax on March 5, 2008 | hide | past | favorite | 2 comments
First: I'm sorry if this isn't aproppriate, and the right place to post it. Feel free to flame me, downmod me, and generally be a nuisance. But since I've been around here for a while I know that there will be someone that can help me.

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....



This post is indeed inappropriate. You should ask for help on the MySQL mailing lists, or on one of the many forums for asking programming questions on the interweb.


Yes I know... I obviously tried quite a few forums, and spent a long time pondering it before I went here. So this was a last resort.

Sorry if I wasted your time.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: