I am updating my table with FMDB. How can i get total number of rows that updated. (Actually i have an issue. My update query is returning "true", even i have no data in that table.)
Thanks in Advance. :)
You are looking for:
- (int)changes;
Used like:
FMDatabase *db = [FMDatabase databaseWithPath:@"store.db"];
if ([db executeUpdate:@"UPDATE xy SET ..."]) {
NSLog(@"Did change %d rows", [db changes]);
}
else {
// handle error
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With