我有这条选择线。
[TableProperties setObject:[NSString stringWithFormat:@"username='%@' AND id IN (SELECT Max(id) FROM messages GROUP BY MD5) ",MobilyUserAccount] forKey:@"tableWhere"];
我想将此选择行更改为。
NSPredicate *findUser = [NSPredicate predicateWithFormat:@"username='%@' AND id IN (SELECT id==max(id) FROM messages GROUP BY MD5)",MobilyUserAccount];
当我让应用程序运行时,我有这个错误。
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Unable to parse the format string "username='%@' AND id IN (SELECT id==max(id) FROM messages GROUP BY MD5)"'
请我需要帮助将第一行转换为。
NSPredicate *findUser = [NSPredicate predicateWithFormat]
谢谢大家