DB Error: 1 "unrecognized token: ":""

来源:互联网 发布:手机数据删除怎么恢复 编辑:程序博客网 时间:2024/06/05 05:26

网上找到http://blog.csdn.net/heihuifeng/article/details/6561615这篇文章 ,插入的字符串需加引号',

 [_dbexecuteUpdate:[NSStringstringWithFormat:@"INSERT INTO %@  (name,img,date,isCome,msg_type,message,isNew,sendFlag,personId) VALUES('%@','%@','%@','%@','%@','%@','%@','%@','%@')",userId,friendData.m_name,friendData.m_imgUrl,data.sendTime,@"1",data.textType,data.chatFileModelJson,@"1",@"3",data.entUserId]];

由于之前没有加引号。
0 0
原创粉丝点击