Simple statement help needed
Although I don't know how to explain in simple terms.
I have a table that has these columns and more:
lineID | lineName | interestOne | interstTwo | interestThree
(where interestOne, Two and Three contain lineID's of other rows)
So a table might look like this:
ID Name One Two Three
1 Tom 2 3 10
2 Fred 1 5 6
3 Bob 2 7 11
I am opening a page that passes in the URL the ID of let's say #1 Tom.
I want to display the One, Two and Three that are associated with Tom. So in the example above (2, 3, 10 respectively).
Now I can do this just fine with displaying:
One=2, Two=3, Three=10
however, I want to display the Names that belong to the ID's. I am having a brain fart and am struggling with this.
So for Tom I want it to show:
One=Fred, Two=Bob and Three=(name for ID 10)
Hopefully this makes sense. If I used separate tables I'd be able to JOIN these all day long. I'm having a tip of your tongue moment with this all in one table.
Thanks in advance!