· 7 years ago · Mar 03, 2019, 12:28 PM
1[_db executeUpdateWithFormat:@"UPDATE t_jewel_template SET data = %@ WHERE idstr = %@;", bookData, bookId];
2
3[_db executeUpdateWithFormat:@"INSERT INTO t_jewel_template(data, idstr) VALUES(data, idstr);", bookData, bookId];
4
5[_db executeUpdateWithFormat:@"DELETE FROM t_jewel_template WHERE idstr = %@;", bookId];
6
7CREATE TABLE IF NOT EXISTS t_jewel_template (id integer PRIMARY KEY, data blob NOT NULL, idstr text NOT NULL);