Search code examples
stringmobileescapingtitaniumquotes

SQLite: Escape quotes in Titanium (Javascript)


I'm using Titanium as a development tool and I would like to insert a string to an SQLite database.

The string contains double quotes ("), so each time it gives an error.

How can I escape the quotes in the string so I can insert the string to the database?

Thanks in advance!

Tjellekes


Solution

  • did you try this

    db.execute("INSERT INTO schedule(NOTE) VALUES(?), "\" i am in quotes \"");