UPDATE in mysql using python
<p>how to do Update in mysql consider Rate is int(8)</p>

<pre><code>k=int(4000);

db=MySQLdb.connect("localhost","user","pass,"databse")

cursor=db.cursor()

sql="UPDATE tablename SET Rate=k WHERE  Name='xxx'

cursor=db.cursor()

try:
      cursor.execute(sql)
      db.commit()
except:
    db.rollback()

db.close()
</code></pre>