For update a table, I write::update set =\"%@\" WHERE =\"%@\"",col1Value,col2Value];
But,this is not working. Please help.
My code is below:
const char *dbpath = [databasePath UTF8String];
sqlite3_stmt *statement;
NSString *querySQL = [NSString stringWithFormat:@"UPDATE AssemblyAssessment SET countedunits=\"%@\" WHERE assemblyid=\"%@\"",self.SAcountedunits,self.asmbIdStr];
const char *query_stmt = [querySQL UTF8String];
if (sqlite3_prepare_v2(ipadSites,query_stmt, -1, &statement, NULL) == SQLITE_OK)
{
if (sqlite3_step(statement) == SQLITE_DONE)
{
NSLog(@"done...");
}
else
{
NSLog(@"not done...");
}
sqlite3_finalize(statement);
sqlite3_close(ipadSites);
}