Here's one that I use... My tables have alike ID values... One has a customer's information and then an ID for that customer which references all actions in a Journal for that customer... It's a pretty hairy query but does exactly what I want it to do:
$result = mysql("$DBName","SELECT tblDCJournal.*, tblCustomerDetail.customerlong, tblSupplyDCTech.DCTechLastName,
tblSupplyStatusOptions.Value, tblSupplyOwners.OwnerLastName, DATE_FORMAT(TimeDate, '%m-%d %H:%i')
FROM tblDCJournal
LEFT JOIN tblCustomerDetail ON tblDCJournal.CustomerID = tblCustomerDetail.customerID
LEFT JOIN tblSupplyDCTech ON tblDCJournal.DCTechID = tblSupplyDCTech.DCTechID
LEFT JOIN tblSupplyStatusOptions ON tblDCJournal.OpenIssue = tblSupplyStatusOptions.ID
LEFT JOIN tblSupplyOwners ON tblDCJournal.Owner = tblSupplyOwners.ID
WHERE tblDCJournal.TimeDate >= DATE_SUB(NOW(),INTERVAL '1' DAY)
ORDER BY tblDCJournal.TimeDate DESC") or die(mysql_error());
while ($row = mysql_fetch_row($result)) {
$customerID= $row[0];
$timeanddate = $row[1];
$dctechID = $row[2];
$openissue = $row[3];
$jobID = $row[4];
$notes = $row[5];
$calendarID = $row[6];
$owner = $row[7];
$closetime = $row[8];
$customerlong = $row[9];
$DCTechLastName = $row[10];
$status = $row[11];
$ownername = $row[12];
$timedate = $row[13];
echo "whatever i am saying for this record... insert variables here."