我有一个问题sqlite
,当我从表中选择一行然后检查两个值是否不同并且没有进入时。sqlite3_step(statement) == SQLITE_ROW
while statement
这是代码:
if (sqlite3_prepare_v2(db, query_stmt, -1, &statement, NULL) == SQLITE_OK)
{
//NSLog(@"working777.............%d",sqlite3_step(statement));
while (sqlite3_step(statement) == SQLITE_ROW)
{
NSLog(@"working888.............%d",SQLITE_ROW);
NSString *addressField = [[NSString alloc] initWithUTF8String: (const char *) sqlite3_column_text(statement, 0)];
NSString *phoneField = [[NSString alloc] initWithUTF8String:(const char *)sqlite3_column_text(statement, 1)];
NSLog(@"............statement...........addressField %@, phoneField %@",addressField,phoneField);
}
sqlite3_finalize(statement);
}
sqlite3_close(db);
}