嘗試獲取兩個表以顯示錶中的數據。Mysql連接未顯示結果
表1(供應商)的所有供應商的詳細信息 表2(repdetails)有我們所有代表的細節和代理商
表1和表2都有REPID列
這裏的SQL查詢:
SELECT suppliers.ID, suppliers.Suppliername, suppliers.postcode, suppliers.address, suppliers.phone, suppliers.fax, suppliers.email, suppliers.website, suppliers.Active, suppliers.imagename, suppliers.RepID, repdetails.RepID, repdetails.RepName, repdetails.RepEmail, repdetails.RepPhone
FROM suppliers
JOIN repdetails
ON suppliers.RepID = repdetails.RepID
The blank fields show where the data should be
任何幫助,不勝感激!
也許你沒有'suppliers.RepID = repdetails.RepID'? – Gedweb