title: Inserting Unknowns into SQLite Database
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1793970/passing-sqlite-variables-in-python">Passing SQLite variables in Python</a>  </p>
  </blockquote>
  
  
  
  <p>I have a function in my script that passes values to a class method, whose job it is to populate its assigned database with the variables it receives. Thing is, I'm not sure on the correct syntax since I'm not working with normal strings. Here's the method.</p>
  
  <pre><code>def new_response(self, link_pattern, link, response, ref_id=""):
      self.db_cursor.execute('''INSERT INTO tb_memory VALUES 
      (%s, %s, %s, %s)''' % (ref_id, link_pattern, link, response))
  </code></pre>
  
  <p>What is the most appropriate syntactical approach?</p>