Trouble with Myqsl

Fernando Rodríguez frr at easyjob.net
Tue Apr 23 05:31:10 EDT 2002


I'm using CompatMysqldb from http://sourceforge.net/projects/mysql-python with
Python 2.2

Whenever I try to insert some data into a mysql db, I get this error:

>>> curs.execute("insert into customer_info (email, url, referrer, first_visit) values ( '%s', '%s', '%s', '%s')", [('billg at microsoft.com', 'www.easyjob.net', 'www.google.com', '2001-03-07 12:32:00')])
Traceback (most recent call last):
  File "<pyshell#26>", line 1, in ?
    curs.execute("insert into customer_info (email, url, referrer,
first_visit) values ( '%s', '%s', '%s', '%s')", [('billg at microsoft.com',
'www.easyjob.net', 'www.google.com', '2001-03-07 12:32:00')])
  File "D:\ARCHIV~1\Python22\Lib\site-packages\CompatMysqldb.py", line 227, in
execute
    af =af+self.__res.affectedrows()
AttributeError: 'NoneType' object has no attribute 'affectedrows'
>>> 

The data does get inserted... What am I doing wrong? O:-)

TIA





-----------------------
Fernando Rodriguez



More information about the Python-list mailing list