Db.update("DELETE e FROM SL_pu_Schema.ETestSupRelateMat as e WHERE EXISTS(SELECT 1 from SL_pu_Schema.Material WHERE MaterialId=e.MaterialId AND FactoryId=1)")
控制台没有输入详细错误信息,但报出了异常 java.sql.SQLException: sql injection violation, syntax error: syntax error, error in :'TE e FROM SL_pu_Schema.ETestSupRela',expect FROM, actual FROM FROM : DELETE e FROM SL_pu_Schema.ETestSupRelateMat as e WHERE EXISTS(SELECT 1 from SL_pu_Schema.Material WHERE MaterialId=e.MaterialId AND FactoryId=1)
sql:Db.use("np3").update( "DELETE FROM np_media_thirdpart_user m WHERE m.enterprise_id =? AND m.user_id =? AND m.media_id IN (SELECT id FROM np_media_thirdpart WHERE enterprise_id = m.enterprise_id AND module =?)", eid, uid, module); 我本地运行可以,但是服务器上报错,错误信息如下:com.jfinal.plugin.activerecord.ActiveRecordException: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mu where mu.enterprise_id=101 and mu.user_id=372140 and mu.media_id in (select i' at line 1