2020-04-27 update 多个字段更新数据库无效

今日解决问题

之前的版本 无法进行成功的更新操作

   [_dbQueue inDatabase:^(FMDatabase *db) {
             [db executeUpdate:@"....",.....];
    }];
修改后的操作

[_dbQueue inDatabase:^(FMDatabase *db) {
[db boolForQuery:quare];
}];

   NSString *quare=NSStringFormat(@"UPDATE tableList SET (demovalue1,demovalue2,demovalue3,demovalue4,demovalue5,demovalue6,demovalue7,demovalue8) = ('%@','%@','%@','%@','%@','%@','%@','%@')  WHERE  deviceMac = '%@' and childrenid = '%@' ",model.demovalue1,model.demovalue2,model.demovalue3,model.demovalue4, model.demovalue5, model.demovalue6, model.demovalue7,model.demovalue8, model.demovalue9,model.demovalue10);
    DLog(@"%@",quare);
    
    [_dbQueue inDatabase:^(FMDatabase *db) {
        [db boolForQuery:quare];
       }];

你可能感兴趣的:(2020-04-27 update 多个字段更新数据库无效)