I want to escape for example single quotation marks in lua:
My script to get some data of a mysql table using sqlite so far:
local sqlCmd = string.format([[INSERT INTO temp_storage
SET gID = '%s'
]], gID)
the problem is the gID
can also contain single quotation marks '
but then the sql statement contains errors.
How to prevent this? I'm not really looking for a way to search and replace - more for a builtin function which replaces so that the sql is still valid.