Skip to content

Commit 4980414

Browse files
committed
fix CCKeyValue 2
1 parent bfde3bf commit 4980414

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CCSQLite/CCKeyValue.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ - (void) setObject: (id) object key : (NSString *) key inCollection: (NSString *
8181
isOK = [db executeUpdate:@"insert into 'CCSQLite.Database2' (collection, key, data, metadata) values (?, ?, ?, ?);", c, key, data, metadata];
8282

8383
if (!isOK) {
84-
isOK = [db executeUpdate:@"update 'CCSQLite.Database2' set collection = ? , key = ? , data = ? , metadata = ? ;", c, key, data, metadata];
84+
isOK = [db executeUpdate:@"update 'CCSQLite.Database2' set data = ? , metadata = ? where collection = ? and key = ?;", data, metadata, c, key];
8585
}
8686

8787
if (!isOK) {

0 commit comments

Comments
 (0)