title: Python MySQL update statement does not work
body: <p>I try to perform a simple update statement in python 2.7 but it won't work at all. I hope someone can show me the mistake:</p>
  
  <pre><code>import MySQLdb
  import datetime
  
  db = MySQLdb.connect(host="localhost",    # your host, usually localhost
                       user="root",         # your username
                       passwd="",  # your password
                       db="******")        # name of the data base
  
  cur = db.cursor()
  
  cur.execute("SELECT * FROM data")
  
  for row in cur.fetchall():
      id_row = str(row[0])
      date = str(row[1])
      new_date = date[:-2]
      new_date += "00"
      cur.execute("UPDATE data SET date={0} WHERE ID={1}".format(new_date, id_row))
  
  db.close()
  </code></pre>
  
  <p>The script should take the date as unix timestamp from the database cut off the 
   last  two numbers, replace them with 00 and update the row in the database. 
  The code to replace the numbers works but the update process does not. 
  It show no error message and exits with code 0.</p>
  
  <p>I have no idea where I made the mistake. Can anyone help? </p>
  
  <p>Thanks a lot!</p>