I
Iain Adams
Hi,
I am new to python. I have been having trouble using the MysqlDB. I
get an error pointing from the line
cursor.execute("UPDATE article SET title = %s, text = %s WHERE id =
%u", (self.title, self.text, self.id))
Here is the error:
line 56, in save
cursor.execute("UPDATE article SET title = %s, text = %s WHERE id
= %u", (self.title, self.text, self.id))
File "/var/lib/python-support/python2.5/MySQLdb/cursors.py", line
151, in execute
query = query % db.literal(args)
TypeError: int argument required
However when I print out type(self.id) I get <type 'int'>.
So surely I have provided an int argument.
Any ideas anyone??
I am new to python. I have been having trouble using the MysqlDB. I
get an error pointing from the line
cursor.execute("UPDATE article SET title = %s, text = %s WHERE id =
%u", (self.title, self.text, self.id))
Here is the error:
line 56, in save
cursor.execute("UPDATE article SET title = %s, text = %s WHERE id
= %u", (self.title, self.text, self.id))
File "/var/lib/python-support/python2.5/MySQLdb/cursors.py", line
151, in execute
query = query % db.literal(args)
TypeError: int argument required
However when I print out type(self.id) I get <type 'int'>.
So surely I have provided an int argument.
Any ideas anyone??