include('../common/conn.php'); $list=[]; $sql="SELECT a.cCusCode,a.cCusName,b.cCCName,a.cCusDepart,c.cDepName FROM dbo.Customer a LEFT JOIN dbo.CustomerClass b on a.cCCCode=b.cCCCode LEFT JOIN dbo.Department c on c.cDepCode=a.cCusDepart where b.cCCCo