Taking my example further then.
Supplier Sup_id | Name | Address
Order Sup_id | ono | ord_date | del_address
Orderitem ono | itemcode | qty | description | unit_price | value
Supplier and order are related by the sup_id field. Orders and items by the ono field.
Suppose you want
Supplier name, ono, ord_date, itemcode , qty , description , unit_price , value
for all items ordered from a particular supplier
$sql = "SELECT s.name, o.ono, o.ord_date, i.itemcode, i.qty, i.description, i.unit_price, i.value " .
" FROM supplier s INNER JOIN order o ON s.sup_id = o.sup_id " .
" INNER JOIN orderitem i ON o.ono = i.ono " .
" WHERE s.sup_id = '$supplierid' ";
hth