Database & 技术 20 Mar 2007 03:31 pm

mysql5.0 上出现1054错误

Error : Unknown column ‘j.cid’ in ‘on clause’
Errno : 1054
select j.*,jf.jid,jf.pid,jf.man,m.cid as comid,m.company from wane_comjobs j,wane_comjobs_fields jf left join wane_member_comfields m on (j.cid=m.cid) where j.jid=jf.jid

语句在4.0上可以跑,看文档在5.1上也能跑,在5.0上跑时需将要连接的表放在右边。


SELECT j. * , jf.jid, jf.pid, jf.man, m.cid AS comid, m.company
FROM wane_comjobs j,wane_comjobs_fields jf
LEFT JOIN wane_member_comfields m ON ( j.cid = m.cid )
WHERE j.jid = jf.jid

Trackback This Post | Subscribe to the comments through RSS Feed

Leave a Reply