query.bindValue(":acc", userInfo.account);
query.bindValue(":pas", userInfo.password);
query.bindValue(":sta",userInfo.status);
query.bindValue(":nic", userInfo.nickname);
query.bindValue(":ico",userInfo.icon);
query.bindValue(":sex", userInfo.sex);
我试过了假如吧上面的不绑定值,而直接改成具体的值并没有错,怎么回事?
4 个解决方案
#1
参数不匹配啊,你把每一个参数打印出来看看与实际你想要的是不是符合的
#2
query.prepare("insert into user values(:acc, :pas, :sta, :nic,:ico, ,:sex )");
这一句里:sex前边怎么多了一个逗号?
这一句里:sex前边怎么多了一个逗号?
#3
就是这个错了,嘿嘿
#4

太机智了,我也犯了这个错

#1
参数不匹配啊,你把每一个参数打印出来看看与实际你想要的是不是符合的
#2
query.prepare("insert into user values(:acc, :pas, :sta, :nic,:ico, ,:sex )");
这一句里:sex前边怎么多了一个逗号?
这一句里:sex前边怎么多了一个逗号?
#3
就是这个错了,嘿嘿
#4

太机智了,我也犯了这个错
