【发布时间】:2011-04-06 05:22:55
【问题描述】:
我在做一些根本性的错误,但我正在网上寻找更好的例子,但结果很短:-(
在.h @interface MyDataViewController : UIViewController {
NSArray *array;
}
@property (nonatomic, retain) NSArray *array;
在米
@synthesize array;
成功的dbretrieval:
while (sqlite3_step(statement) == SQLITE_ROW) {
//I guess this one is wrong but I cant figure it out.. (tired?)
array = [NSString stringWithUTF8String:(char *)sqlite3_column_text(statement, 0)];
//testoutput to textfield:
//myName.text = [NSString stringWithUTF8String:(char *)sqlite3_column_text(statement, 0)];
//testoutput to nslog:
NSLog(@"Data: %@",[NSString stringWithUTF8String:(char *)sqlite3_column_text(statement, 0)]);
}
从 sqlitequeryn 输出最后一个:
NSLog(@"%@", array);
【问题讨论】:
标签: iphone arrays xcode sqlite populate