Hi,
before you start to make inserts/updates to the database you can put
$db->query("begin;") -> this is to begin a transaction, in the end of the script
you put commit ($db->query("commit;") if all goes ok, otherwise rollback
($db->query("rollback;").
andré brás
Citando Andy Hall <[EMAIL PROTEC
If you have a reason not to use InnoDB tables (e.g., speed, licensing,
fulltext indexes), you can implement pretty good client-side rollback in
PHP. Just send all calls through a database class (insert(), update(),
delete()) and if a transaction flag is set then they store in a stack a
little q
Any reason you can use a version of MySQL that contains transaction aware
tables?
-Original Message-
From: Andy Hall
To: [EMAIL PROTECTED]
Sent: 3/11/04 8:29 AM
Subject: Best practise roll-backs?
Hi,
I have a PHP script that is running 4 queries. If the 4th fails, ideally
I would like
Hi,
I have a PHP script that is running 4 queries. If the 4th fails, ideally I would like
the other 3 queires to roll back and leave the database as if they were never run at
all.
Can anyone advise on any technique that would do this easily, as opposed to manually
writing and running queries t