は、ここで私は、アレイ内のデータベースの唯一の最後の値を取得しています私のコードですが、私はsqliteの列の値を取得し、目的のCの配列に格納する方法は?
//select the values from the db
NSString *sql = [NSString stringWithFormat:@"SELECT * FROM district_details"];
sqlite3_stmt *statement;
if (sqlite3_prepare_v2(db, [sql UTF8String], -1, &statement, nil)==SQLITE_OK)
{
while (sqlite3_step(statement)==SQLITE_ROW)
{
char *field2 = (char *)sqlite3_column_text(statement, 1);
field2Str = [[NSString alloc]initWithUTF8String:field2];
str = [NSString stringWithFormat:@"%@", field2Str]; NSLog(@"the value from thr field1 from the district name is %@...",field2Str);
myarray =[[NSMutableArray alloc]initWithObjects:@"--select the value--",nil];
[myarray addObject:field2Str];
NSLog(@"the value of the myarray is......%@",myarray);
}
}
ありがとう – pavithra