【发布时间】:2014-10-13 18:45:27
【问题描述】:
我认为这不是正确的格式,因为控制台在 nslog 检索所有权结果时停止。我需要解决这个问题吗?创建一个临时表来存储 qr 的 where 然后搜索 where 用户?还是我可以更新我的 sql 语句?
[database executeQuery:@"select * from ownership where qrcode = ? and user = ?;", ktQRcode, userktid];
NSLog(@"retrieving ownership results through qrcode and userid");
while ([results next]) {
OWNERSHIP *ktownership = [OWNERSHIP new];
ktownership.uniqueIDownership = [results intForColumn:@"id"];
ktownership.user = [results intForColumn:@"user"];
ktownership.qrcode = [results intForColumn:@"qrcode"];
ktownership.create_at = [results dateForColumn:@"create_at"];
[foundOwnership addObject:ktownership];
ownershipcount = [foundOwnership count];
NSLog(@"addnewownership count: %lu", foundOwnership.count);
NSLog(@"addnewownership Array: %@", foundOwnership);
【问题讨论】:
-
“它停止”是什么意思 - 您是否收到错误消息或堆栈跟踪?您是否不小心在该行上设置了断点(空白处的蓝色标志)?
标签: ios sql objective-c fmdb