Click to See Complete Forum and Search --> : help me out


coe_sniper
11-19-2007, 11:50 PM
I have a table, product. In the product table, there is mainly product id, supplier id and the rest.
When a product id is give, i want to display the rest of the productid who have the some supplier as the given product id.
And in the list, the given product id should not be shown. CAn anyone pls tell me how to do it. I doubt that i have to use union, but i am not sure.

chazzy
11-21-2007, 05:59 AM
I would do this on the programming side, rather than the db side.

First do a single query to get the product they clicked on. Then do a second query now that you know the product to get the other products w/ the same supplier.