[DB-SIG] 'long' object has no attribute 'fetchall'

Olivier Collioud ocollioud@nagora.com
Sun, 03 Nov 2002 23:01:38 +0100


Hi,

I am new to both Python and MySQL...
but, please, help me cause I'm really stuck.

Below is my piece of code:
import MySQLdb
db = MySQLdb.Connection('localhost','','','test')
cursor = db.cursor()
cursor = cursor.execute('SELECT * FROM articles')
cursor.fetchall()

Error is:
AttributeError: 'long' object has no attribute 'fetchall'

I use:
Windows 2000
MySQL 3.23.53 (mysqld-max-nt)
Python 2.2.2
MySQL-python-0.9.2.win32-py2.2

Thaks,

Olivier.