dyanamo
Senior Member
Hi
Basically I want to know if the following is possible and how to do it if it is :
I have 2 tables
(table listing) id, part_id
(table part) id, name
Now when I query (table listing) normally I would get a result say 1,5. The result i want however is 1,"part name"
So basically when I query (table listing) it automatically replaces part_id with the value stored in name in (table part) where the id's match.
I can do this programatically but would prefer to do it database level to minimize calls.
Notes
if (table listing) part_id does not exist in table part must just return a empty result.
Basically I want to know if the following is possible and how to do it if it is :
I have 2 tables
(table listing) id, part_id
(table part) id, name
Now when I query (table listing) normally I would get a result say 1,5. The result i want however is 1,"part name"
So basically when I query (table listing) it automatically replaces part_id with the value stored in name in (table part) where the id's match.
I can do this programatically but would prefer to do it database level to minimize calls.
Notes
if (table listing) part_id does not exist in table part must just return a empty result.