title: Inserting double quotes into MySql db
body: <p>I need to insert a value which contains double quotes into MySql db:</p>
  
  <pre><code>import MySQLdb
  cursor = db.cursor()
  sql_pattern = 'INSERT INTO Table(column1, column2, column3....) VALUES("{0}".....)'
  data_object_array = get_data_object_array()
  for item in data_object_array():
    sql = sql_pattern.format(item["attr1"], item["attr2"]....)
    cursor.execute(sql)
  </code></pre>
  
  <p>I have an error of </p>
  
  <pre><code>_mysql_exceptions.ProgrammingError: (1064, 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'data" fdsfds5454 "data2"")\' at line 1')
  </code></pre>
  
  <p>where <code>"data" fdsfds5454 "data2"</code> is the data which contains <code>item["attr1"]</code></p>
  
  <p>How do I get rid of it?</p>