I would try a left join. I am not sure if it works because i am a little bit out of practice.

But you could try this:



SELECT p_id FROM purchases, LEFT JOIN client ON (client.id=purchases.c_id) WHERE id = 2 OR id=4;

you should get the id of the purchases. you didn't mention the name of the purchases, you can add it after the SELECT and add a ,

hope i could help
BlazZ Reviewed by BlazZ on . mysql query help ($5 reward) i have the following tables client ----- id name purchases --------- p_id Rating: 5