question about deleting records from mysql

Roman Neuhauser neuhauser+python-list#python.org at sigpipe.cz
Wed Jul 27 14:34:26 CEST 2005


# nephish at xit.net / 2005-07-27 05:12:46 -0700:
> ok. did this
> 
> >>> cursor.execute("DELETE FROM table WHERE autoinc > 1000")
> 245L
> >>> cursor.commit()
> 
> i got an AttributeError 'Cursor' object has no attribute 'commit'
> 
> hmm. what should i do now?

    RTFM, e. g. here:

    http://cvs.sourceforge.net/viewcvs.py/mysql-python/MySQLdb/doc/MySQLdb.txt?rev=1.1&view=auto

-- 
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE.             http://bash.org/?255991



More information about the Python-list mailing list