title: SQL update command with python not working
body: <p>I'm having an issue getting my python script to update my sqlite db.</p>
  
  <p>The first part seems to work fine:</p>
  
  <pre><code>conn = sqlite3.connect('/Users/test/Desktop/my-accounts.db')
  currentAccount = None
  
  for row in conn.execute('SELECT email FROM accounts WHERE active=0'):
      currentAccount = row[0]
      print "Checking out: ",currentAccount
      break
  
  if currentAccount is None:
      print "No available accounts"
  </code></pre>
  
  <p>Then this next part I want to take the variable currentAccount and update the row in the db where that value is.</p>
  
  <pre><code>else:
      conn.execute('UPDATE accounts SET active=1 WHERE email=?', [currentAccount,])
  
  conn.close()
  </code></pre>
  
  <p>I don't get any errors in the console but the db does not update. The email column is a VARCHAR and the active column is an INT.</p>
  
  <p>Thanks.</p>
  
  <p><strong>SOLUTION</strong> was to add 
  <code>conn.commit()</code> after execute()</p>