某些版本的mysql不支持join语句?急!!!
select c.contname, s.totpts from chartercommittees cc left outer join stats s on s.chartercommid = cc.chartercommid
and s.we = '2007-08-02 00:00:00' join conts c on cc.cccontid = c.cccontid Where cc.cccontid not in (13, 14)
这个语句在我本地mysql运行很正常,放客户服务器上就通不过,报sql语法错误You have an error in your SQL syntax near 'on cc.cccontid = c.cccontid Where cc.cccontid not in (13, 14)
必须改成select c.contname, s.totpts from chartercommittees cc,conts c left outer join stats s on s.chartercommid = cc.chartercommid
and s.we = '2007-08-02 00:00:00' Where cc.cccontid = c.cccontid and cc.cccontid not in (13, 14) 才可以用
我本地mysql是4.0.26,客户server的是mysql 3.23,我觉得可能与mysql设置有关,大家以前遇到过这个问题吗?