Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在用 FMDB 更新我的表。我怎样才能获得更新的总行数。(实际上我有一个问题。我的更新查询返回“true”,即使我在该表中没有数据。)
提前致谢。:)
您正在寻找:
- (int)changes;
像这样使用:
FMDatabase *db = [FMDatabase databaseWithPath:@"store.db"]; if ([db executeUpdate:@"UPDATE xy SET ..."]) { NSLog(@"Did change %d rows", [db changes]); } else { // handle error }