title: Python: inserting double or single quotes around a string
body: <p>Im using python to access a MySQL database and im getting a unknown column in field due to quotes not being around the variable.</p>
  
  <p>code below:</p>
  
  <pre><code>cur = x.cnx.cursor()
  cur.execute('insert into tempPDBcode (PDBcode) values (%s);' % (s)) 
  rows = cur.fetchall()
  </code></pre>
  
  <p>How do i manually insert double or single quotes around the value of s?
  I've trying using <code>str()</code> and manually concatenating quotes around <code>s</code> but it still doesn't work. 
  The sql statement works fine iv double and triple check my sql query.</p>