0

最近、MYSQL のバージョンを 4 から 5 にアップグレードしたところ、このエラーが発生しました。

エラー番号: 1054 エラー: 'on 節' の不明な列 '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` 

お知らせ下さい..

ありがとうございました、

4

1 に答える 1

0

その理由はthere is no column named city in table ben_master。確認してください。
幸運を!

于 2013-04-09T04:59:09.503 に答える