2023年8月3日发(作者:)

mysql批量更新badSQLgrammar[]错误错误代码如下:### The error may involve BatchSyncPhoneAndEmail-Inline### The error occurred while setting parameters### SQL: update liaoning_com_info_ty SET com_phone = ? where com_name = ? ; update liaoning_com_info_ty SET com_phone = ?,

SET com_phone = ',,13' at line 5 SET com_phone = ',,13' at line 5### Cause: yntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your My; bad SQL grammar []; nested exception is yntaxErrorException: You have an error in your SQL syntax; check the manu代码如下: update liaoning_com_info_ty

com_phone = #{ne}, com_email = #{il} where com_name = #{e} 只有⼀条的时候可以执⾏,两条以上就会报错。纠结半天,么有发现问题。最后终于明⽩了,allowMultiQueries=true

需要这个参数才能执⾏多条sql,默认是⼀条。jdbcUrl=jdbc:mysql://192.168.1.203:3306/shiro?useUnicode=true&characterEncoding=utf8&allowMultiQueries=true

2023年8月3日发(作者:)

mysql批量更新badSQLgrammar[]错误错误代码如下:### The error may involve BatchSyncPhoneAndEmail-Inline### The error occurred while setting parameters### SQL: update liaoning_com_info_ty SET com_phone = ? where com_name = ? ; update liaoning_com_info_ty SET com_phone = ?,

SET com_phone = ',,13' at line 5 SET com_phone = ',,13' at line 5### Cause: yntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your My; bad SQL grammar []; nested exception is yntaxErrorException: You have an error in your SQL syntax; check the manu代码如下: update liaoning_com_info_ty

com_phone = #{ne}, com_email = #{il} where com_name = #{e} 只有⼀条的时候可以执⾏,两条以上就会报错。纠结半天,么有发现问题。最后终于明⽩了,allowMultiQueries=true

需要这个参数才能执⾏多条sql,默认是⼀条。jdbcUrl=jdbc:mysql://192.168.1.203:3306/shiro?useUnicode=true&characterEncoding=utf8&allowMultiQueries=true