iOS FMDB修改数据不成功的问题解决方法

SQL语句和FMDB格式按照这个来写就可以更新数据了

  BOOL isSuccess = [db executeUpdateWithFormat:@"UPDATE ut_news SETnUserName = %@, nUserImage = %@, newsId = %@, nText = %@, nVideo = %@, nPlace = %@, nClickNum = %@, nDisNum = %@, isClick = %@, nImageList = %@ WHERE nTime = %@",model.nUserName, model.nUserImage, model.newsId, model.nText, model.nVideo, model.nPlace, [NSNumber numberWithInt:model.nClickNum], [NSNumber numberWithInt:model.nDisNum], model.isClick, nImageListData, nTime, nil];
      if (!isSuccess) {
         NSLog(@"更新失败");
       }else {
           NSLog(@"更新成功");
       }

你可能感兴趣的:(iOS FMDB修改数据不成功的问题解决方法)