iphone - ObjectiveC sqlite3 issue -


i'm finding have issue when updating/inserting table in iphone app because have text column, , when text includes ' symbol, things messed up. best way handle this?

should check before use string has apostrophe? there quick way add formatting add escape character in front of each apostrophe?

does question make sense? lol.

sqlite requires ' symbol escape 2 ''.

look @ official sqlite faq:

(14) how use string literal contains embedded single-quote (') character?  sql standard specifies single-quotes in strings escaped putting 2 single quotes in row. sql works pascal programming language in regard. sqlite follows standard. example:      insert xyz values('5 o''clock');

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -