我正在做一个项目,它将从数据库加载数据并将其显示在tableView中。
我想知道......从数据库分配到voucher.date中为NSDate执行的代码是什么
代码行=(voucher.date = [[NSNumber alloc](init with sqlite3 statement line);)
回复将是一个很大的帮助! :)
NSMutableArray *vouchers = [[NSMutableArray alloc]init];
while (sqlite3_step(statement) == SQLITE_ROW)
{
searchAndClaim *voucher = [[searchAndClaim alloc]init];
voucher.inquiry_id = [[NSNumber alloc] initWithInt:sqlite3_column_int(statement, 0)];
voucher.name = [[NSString alloc] initWithUTF8String:
(const char *) sqlite3_column_text(statement, 1)];
voucher.date = [[NSNumber alloc](init with sqlite3 statement line);
voucher.branch = [[NSString alloc] initWithUTF8String:
(const char *) sqlite3_column_text(statement, 4)];
voucher.expDate = [[NSString alloc](init with sqlite3 statement line)];
[vouchers addObject:voucher];
}