我想将 ycount 字段添加到 1;
即ycount=ycount+1;
这是行不通的
[self Check_Create_DB];
sqlite3 *database;
NSString *sqlTmp=[NSString stringWithFormat:@"update images set ycount=ycount+1 where imgid= '%d'",idimg ];
NSLog(@"%@",sqlTmp);
const char *sqlstmt=[sqlTmp UTF8String];
sqlite3_stmt *cmp_sqlstmt;
int returnvalue=sqlite3_prepare_v2(database,sqlstmt,-1,&cmp_sqlstmt,NULL);
NSLog(@"return value.....%d",returnvalue);
if(returnvalue == SQLITE_OK)
{
sqlite3_bind_int(cmp_sqlstmt,1,ycount+1);
}
这段代码有什么错误