question about deleting records from mysql

nephish nephish at xit.net
Wed Jul 27 08:46:23 EDT 2005


Man, thanks for the link. and the tip. i am testing
the db.commit() and printing the doc right now.
thanks again.


On 07/27/2005 07:43:24 AM, Rowdy wrote:
> nephish at xit.net wrote:
>> 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?
>> the stuff about writing a lightweight layer between the dbapi and the
>> program shot right over my head. sorry, but thanks
>> 
> 
> IIRC it is the connection that can commit(), not the cursor.
> 
> Rowdy
> 




More information about the Python-list mailing list