批量执行SQL集合报错

95279527.png

评论区

MR.zhangzhiwei

2019-08-15 17:21

sql集合里面已经赋值,但是批量执行就报错,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 'a-0a40,1)' at line 1

MR.zhangzhiwei

2019-08-15 17:22

可能不是jfinal的问题,是我sql写错了吗,但是我看sql也没问题

MR.zhangzhiwei

2019-08-15 17:23

大佬帮忙指点一下下

戒不掉

2019-08-15 17:26

Object[][] obj=new Object[list.size()][4];
for(int i=0;i obj[i][0]=UUIDKit.UUID();
obj[i][1]=host_ids;
obj[i][2]=list.get(i).get("ids");
obj[i][3]=0;
}
Db.batch("insert into beeeye_host_realtime_alarm (ids,host_ids,alarm_ids,system_time) values(?,?,?,?)",obj,1024);

MR.zhangzhiwei

2019-08-15 17:28

@戒不掉 我是要存map进数据库,貌似你的这种集合我会,但是这种情况不适用

热门反馈

扫码入社