title: Lua string.format escaping
body: <p>I want to escape for example single quotation marks in lua:</p>
  
  <p>My script to get some data of a mysql table using sqlite so far:</p>
  
  <pre><code>local sqlCmd = string.format([[INSERT INTO temp_storage
  SET     gID = '%s'
  ]], gID)
  </code></pre>
  
  <p>the problem is the <code>gID</code> can also contain single quotation marks <code>'</code> but then the sql statement contains errors.</p>
  
  <p>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.</p>