Interested in improving this site? Please check the To Do page.
sqlite.escapeQuotes
Substitute in-line single quotes with two single-quotes
Syntax
sqlite.escapeQuotes(s)
Params
s is a string.
Returns
A string where every single quote mark is replaced by two single quote marks.
Examples
query = "select verbname from verbs where category='string'" query = sqlite.escapeQuotes(query) » select verbname from verbs where category='string' query = "select * from desc where phrase="I can't believe it's not Frontier!" query = sqlite.escapeQuotes(query) » I can''t believe it''s not Frontier!
Notes
Note that the conversion is to two single quotes, not a double quote. This is per the SQL standard. Also, don’t think this is enough to keep you from having query string problems. All punctuation is likely to need careful attention to detail.