hi list,

this is one of these faq-questions (for sql queries) nowhere found. normally
two tables are
joined by two singular keys, for instance "id" which is (1) in both tables.
But how do I join them over a id-field like this:(1,2,4)? I know, there is
the WHERE id IN(...) function, but if I do a:
SELECT dogs.name FROM dogs,pets WHERE dogs.id IN (pets.id) AND
pets.name="dogs"
I get, as expected, just one row. Is there another way?
thanks in advance,

jan


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to