There are a few point which are unclear. What do you mean by "group", since nothing else suggests the need for grouping? What is "S/B"?
If I understand the requirements, a (natural) inner join is what you need:
Code:
SELECT shipTo.address
FROM parts
JOIN cust ON parts.custID = cust.custID
JOIN shipTo ON shipTo.shipID = cust.shipID
or
Code:
SELECT shipTo.address
FROM parts
NATURAL JOIN cust
NATURAL JOIN shipTo
What's the full schema (CREATE statements) for these tables? There are a few aspects (such as parts referring to customers) that make me suspect the design is flawed.
If by "no PDO" you mean you're using the outdated mysql driver, don't. The only reason it's still around is to support legacy code.