我必须更新 parse.com 上表中的多条记录。它与在多条记录中将消息状态从未读更改为已读有关。这是更新单个记录的示例。
PFQuery *query = [PFQuery queryWithClassName:@"GameScore"];
// Retrieve the object by id
[query getObjectInBackgroundWithId:@"xWMyZ4YEGZ" block:^(PFObject *gameScore, NSError *error) {
// Now let's update it with some new data. In this case, only cheatMode and score
// will get sent to the cloud. playerName hasn't changed.
[gameScore setObject:[NSNumber numberWithBool:YES] forKey:@"cheatMode"];
[gameScore setObject:[NSNumber numberWithInt:1338] forKey:@"score"];
[gameScore saveInBackground];
}];
如何更新多条记录?
为了更清楚,我必须执行类似的查询: Update tableName SET messageStatus = 'read' Where userId = 'someId'
有什么帮助吗?