[DB-SIG] MySQLdb execute hangs on INSERT

Tommy root at cargoa2b.com
Thu Feb 8 19:39:49 CET 2007


Hello!
I have a question that maybe someone can answer me... 
When I do like this
"""
db = MySQLdb.connect( host = "localhost", user = "root", passwd = "****" )
cur = db.cursor()
cur.execute( "INSERT INTO `mytest`.`clients` (
`SessionID`,`InitialLogin`,`LastActivity` ) VALUES ( %s, %s, %s )", ( sessID,
timed, timed ) )
"""
the script hangs.. while doing the exact same within IDLE it just runs and
inserts the row as expected even within a function or class

MySQL 5.0.27
Python 2.4
MySQL-python.exe-1.2.1_p2.win32-py2.4
WindowsXP SP2

By the way, using _mysql within the script and the same statement works fine

Hope to get som answers, Have a nice day.
Tommy



More information about the DB-SIG mailing list