我最近将MYSQL版本从4升级到5,我收到此错误..
错误号码:1054 错误:'on clause'
中的未知列'c.city'`SELECT b.expirydate, a.ben_changed, a.amlnotes, a.processdate, c.phone AS beneficiaryphone, cpstate.statename AS collectionpointstate, cpcity.cityname AS collectionpointcity, cp.agentname AS collectionpointname, cp.agentaddress AS collectionpointaddress, cp.agenttelephone AS collectionpointphoneno, b.postcode AS customerpostcode, co.countryname AS bencountryname, st.statename AS benstatename, ct.cityname AS bencityname, a.depositbankname AS depositbankname, b.address AS customeraddress, b.phone AS customerphone, a.releasedate, a.releasedby, a.collectiontype, b.mobile AS customermobile, c.mobile AS beneficiarymobile, a.releasemessage, a.releaseorder, a.amlnotes, bf.bankname, a.branchname, a.accountno, a.ordertime, h.agentname AS payingagentname, a.cashcommission, d.agentname AS officename, a.orderdate, a.orderid, a.orderamount, a.agentcommission, e.username AS orderby, g.currencycode AS fromcurrency, f.currencycode AS currency, a.exchangerate, a.benamount, b.surname AS customersurname, b.firstname AS customerfirstname, c.surname AS bensurname, c.firstname AS benfirstname, a.orderstatus, a.saleid, a.benid, a.contactid
FROM contact_master b, ben_master c, agent_master d, sales_master a
LEFT JOIN agent_master cp ON a.collectionofficeid = cp.agentid
LEFT JOIN city_master cpcity ON cp.city = cpcity.cityid
LEFT JOIN state_master cpstate ON cp.state = cpstate.stateid
LEFT JOIN currency_master f ON a.currency = f.currencyid
LEFT JOIN city_master ct ON c.city = ct.cityid
LEFT JOIN state_master st ON c.state = st.stateid
LEFT JOIN country_master co ON c.country = co.countryid
LEFT JOIN currency_master g ON a.fromcurrency = g.currencyid
LEFT JOIN user_master e ON a.orderby = e.userid
LEFT JOIN payingagent_master h ON a.payingagent = h.agentid
LEFT JOIN bank_master bf ON a.bankname = bf.bankid
WHERE a.contactid = b.contactid
AND a.benid = c.benid
AND a.officeid = d.agentid
AND a.contactid = '2'
AND orderdate & gt ; = '2013-04-09'
AND orderdate & lt ; = '2013-04-09'
AND a.orderby != 'onlinewebsite'
ORDER BY orderdate, ordertime ASC
LIMIT 0 , 30`
请告知..
谢谢,
答案 0 :(得分:0)
原因是there is no column named city in table ben_master
。请确认。
祝你好运!