Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by plsremoveme

  1. plsremoveme

    select...

    Hello! The one example with the sub selects does not work. I suppose it's because MySQL does not support any sub selects. But the other two examples work really great! :) I think I will use the last example you posted. It is the easiest one to extend. I will have to look into this...
  2. plsremoveme

    select...

    Hey it's me again... as I already said, the only version which works is the first one posted by carp. Now I've got another problem... How can I easily extend the select thingy? Let's say now I want all the ID2's which have ID1=1 ID1=2 ID1=3 in common? or in other words ID1=1 ... ID1=n ? I...
  3. plsremoveme

    select...

    Alright... ...now i understand HOW it works. and finally i got the first example shown by carp run successfully. if i use yours which is quite similar but also different to that one i receive an error "1064"? I'd like to know what is wrong with it?! For a better understanding of the...
  4. plsremoveme

    select...

    Somehow my last answer was not sent properly. Anyways i use "MySQL" and the result of this SELECT will be used in "PHP". I am pretty new to SQL and I guess that is the reason for my probs. :) I thought those other two suggestions would use two tables instead of one. I guess...
  5. plsremoveme

    select...

    Hi! Well I use MySQL. The result of the whole "SELECT" thingy will be used in PHP. You say that the suggested solutions refer to ONE table. Then I must have misunderstood them. As i already said I am quite new to SQL, so maybe you could try to explain it to me once again. I hope there...
  6. plsremoveme

    select...

    Hello everybody! This approach: SELECT id2 FROM myTable WHERE id1 = 1 INTERSECT SELECT id2 FROM myTable WHERE id1=2; caused an error. Maybe I should say that I use MySQL ? I am kinda new to this SQL-stuff... Besides this: I only have ONE table with those two fields ID1 and ID2. TIA. If you...
  7. plsremoveme

    select...

    Hmmm... wouldn't that be the same as this: SELECT * FROM MyTable WHERE ID1 = '1' OR ID1 = '3' ? Because both (your version and mine) do not give me the desired result :-( But maybe i got you somehow wrong. Untill now I never heared of that "in" command. TIA! Oliver
  8. plsremoveme

    select...

    Hey yall. I've got a table which looks like this: ID1 ID2 1 1 1 2 1 3 2 1 2 3 3 1 4 4 I want to have all those ID2's which have ID1=1 and ID1=2. Desired result would be: ID2: 1 and 3. It might look kinda weird but i hope that you get what i want. Thanks...

Part and Inventory Search

Back
Top