title: Python MySQL Syntax Error - DUPLICATE KEY UPDATE
body: <p>I have the following MySQL + Python code:</p>
  
  <pre><code>data = json.loads(decoded_response)
  
  insert_values = []
  cursor = cnx.cursor()
  add_data = """INSERT INTO pb_ya_camps (camp_id,camp_name) VALUES (%s,%s) ON DUPLICATE KEY UPDATE VALUES (%s,%s)"""
  
  for jsonData in data["data"]:
          if "No" in jsonData["StatusArchive"]:
                  print("...processing campaign ",jsonData["Name"],"into the database.")
                  insert_values.append((jsonData["CampaignID"],jsonData["Name"]))
  
  try:
          cursor.executemany(add_data,(insert_values,insert_values))
  </code></pre>
  
  <p>Which at the moment produces the following error:</p>
  
  <pre><code>MYSQL ERROR: Failed processing format-parameters; 'MySQLConverter' object has no attribute '_tuple_to_mysql'
  </code></pre>
  
  <p>As far as I understand it is not liking the following:</p>
  
  <pre><code>cursor.executemany(add_data,(insert_values,insert_values))
  </code></pre>
  
  <p>I believe you can't do that with Python...but my problem probably derives from improper MySQL syntax. Could you please take a look at it?</p>
  
  <pre><code>INSERT INTO pb_ya_camps (camp_id,camp_name) VALUES (%s,%s) ON DUPLICATE KEY UPDATE VALUES (%s,%s)
  </code></pre>
  
  <p>I am not sure how to properly use the ON DUPLICATE KEY UPDATE without having to re-specify all the values...   &lt;&lt;&lt;--- <strong>that is the main problem.</strong></p>
  
  <p>I have read the following: <a href="https://stackoverflow.com/questions/867166/mysql-on-duplicate-key-update">LINK TO PREVIOUS EXAMPLE</a> however I don't want to rely on KEY UPDATE col1 = VALUES(col1) because in a further part of my script I have too many columns to keep listing as part of col = value for each column...</p>
  
  <p>Thank you!</p>