title: How to On Duplicate Key Update
body: <p>I have this query that is executed in my Python script but when its inserting into the database and finds a duplicate of my unique column it causes it to error and stops. I know I need to use On Duplicate Key Update but I'm note sure how to properly add this.</p>
  
  <p>My unique column 2.</p>
  
  <pre><code>cur.execute("""INSERT INTO logs (1,2,3) VALUES (%s,%s,%s) """,(line[0], line[1], line[2]))
  </code></pre>
  
  <p>If there is a duplicate to have it update that row/entry.</p>