\n"; //$q = "select * from headers where (lName like '%Dollarama%' or lName like '%Reitmans%') and status != 'CLOSED' and status != 'VOID' order by protectron,fName"; // $q = "select * from headers where (lName like '%Dollarama%' or lName like '%Reitmans%' or cCode='033000004' or oCode='033000004') and status != 'CLOSED' and status != 'VOID' order by fName,protectron"; $q = "select * from headers where (cCode='033000004' or oCode='033000004') and status != 'CLOSED' and status != 'VOID' order by fName,protectron"; $callList = mysql_query($q); while ($call = mysql_fetch_assoc($callList)) { if (empty($call['protectron'])) $lName = $call['lName']; else $lName = $call['protectron']; $fName = fixName($call['fName'],"(".substr($call['lName'],0,4).")", " -"); echo " \n"; echo " ".fixName($fName,$lName, " ")."\n"; //echo " ".fixName($call['fName'],$lName, " -")."\n"; //echo " ".fixName($call['fName'],$call['lName'])."\n"; echo " {$call['address']}\n"; echo " {$call['city']}\n"; echo " {$call['status']}\n"; echo " {$call['oType']}\n"; echo " \n"; } echo "\n"; ?>