I believe the latest version of mysql does finally support transactions...,
but if upgrade is not an option, depending on how dynamic your queries are,
it might be easy to just create an array of rollback queries, meaning
delete... update... to the previous db state and then execute all or how
ever many needed to go back to previous data.  I would keep a counter and
depending on what do() command number it is, loop the array of undo queries
that many time for that many indexes.

HTH
Ilya Sterin

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf
Of Mike<mickalo>Blezien
Sent: Sunday, March 11, 2001 5:47 PM
To: [EMAIL PROTECTED]
Subject: RollBacks


Hello All,

This maybe more of a MySQL question than DBI, but I have a Perl script that
does
4 INSERTS into various tables. I know MySQL doesn't support Transactions,
but
when the data is inserted into the tables and during the process a error is
encountered during an insert, is there an way to undo what was entered into
any
other tables prior to the error. I normally use "$dbh->do($query); on all
UPDATES and INSERTS.

any suggestion much appreciated.

TIA,


Mike(mickalo)Blezien
========================================
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Tel: 1(225) 686-2002
=========================================












Reply via email to