while (sqlite3_step (statement) == SQLITE_ROW) 루프가 실행되고 있지 않습니다. 아무도 도와 드릴 수 있습니까?(sqlite3_step (statement) == SQLITE_ROW) 실행되지 않았습니까?
NSLog(@" %d, %d ",sqlite3_step(statement),SQLITE_ROW);
출력은 항상 다음 21 100
sqlite3_stmt *statement;
sqlite3 *database;
if (sqlite3_open("myDB.sql", &database) == SQLITE_OK) {
NSLog(@"1 %d",SQLITE_OK);
NSLog(@" %d, %d ",sqlite3_step(statement),SQLITE_ROW);
const char *sql = "SELECT myName FROM myTable";
if (sqlite3_prepare_v2(database, sql, -1, &statement, NULL) == SQLITE_OK) {
while (sqlite3_step(statement) == SQLITE_ROW) {
int primaryKey = sqlite3_column_int(statement, 0);
}
}
if (statement) {
sqlite3_finalize(statement);
}
}
당신은 좀 더 코드를 게재 할 수 있습니까? –