テーブルから単一の行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);
}