List:General Discussion« Previous MessageNext Message »
From:Critters Date:May 23 2006 10:52am
Subject:I think I need a join
View as plain text  
I think the following could be done with some sort of JOIN, but I am now 
sure how:



[country]:
id, country, number
1, Germany, 27
2, Japan, 30
3, United States, 18

[days]
id, day, countryA, countryB
10, monday, 1, 3
11, tuesday, 2, 3
12, wednesday, 1, 2

[result I want]
10, monday, Germany, 27, United States, 18
11, tuesday, Japan, 30, United States, 18
12, wednesday, Germany, 27, Japan, 30

Hope that makes sence :)

I can get it to join on either countryA or countryB but not both :|
--
David 

Thread
InnoDB problems under 5.1.9Ben Clewett23 May
  • RE: InnoDB problems under 5.1.9SST - Adelaide)23 May
    • Re: InnoDB problems under 5.1.9Ben Clewett23 May
      • RE: InnoDB problems under 5.1.9SST - Adelaide)23 May
        • Re: InnoDB problems under 5.1.9Ben Clewett23 May
        • I think I need a joinCritters23 May
          • Re: I think I need a joinPeter Brawley23 May
    • How do I get off this list that I do not remember joining in the first place!!!!Phil Robbins25 May
      • Re: How do I get off this list that I do not remember joining inthe first place!!!!Daniel Kasak25 May
        • Re: How do I get off this list that I do not remember joining in the firstplace!!!!Phil Robbins26 May
          • Re: How do I get off this list that I do not remember joining inthe first place!!!!James Harvard26 May
          • Re: How do I get off this list that I do not remember joining inthe first place!!!!Daniel Kasak26 May
      • RE: How do I get off this list that I do not remember joining in the first place!!!!Tim Lucia25 May
  • Re: InnoDB problems under 5.1.9gerald_clark23 May
    • Re: InnoDB problems under 5.1.9Ben Clewett23 May
    • Re: InnoDB problems under 5.1.9Ben Clewett23 May
      • Re: InnoDB problems under 5.1.9Dan Buettner23 May
        • Re: InnoDB problems under 5.1.9Ben Clewett23 May
          • Re: InnoDB problems under 5.1.9Dan Buettner23 May
            • Re: InnoDB problems under 5.1.9Ben Clewett23 May
            • Re: InnoDB problems under 5.1.9Ben Clewett23 May