Can't seem to insert rows into a MySQL table

Patrick Useldinger at
Sat Mar 12 19:33:17 CET 2005

grumfish wrote:

> connection = MySQLdb.connect(host="localhost", user="root", passwd="pw", 
> db="japanese")
> cursor = connection.cursor()
> cursor.execute("INSERT INTO edict (kanji, kana, meaning) VALUES (%s, %s, 
> %s)", ("a", "b", "c") )
> connection.close()

Just a guess "in the dark" (I don't use MySQL): is "commit" implicit, or 
do you have to add it yourself?


More information about the Python-list mailing list