You should use
set autocommit = 0;
start transaction ;
insert code;
delete code;
update code;
commit or rollback depending on the result;
To do all this I had to use InnoDB table types.
Sorry, my english is quite pour,
Best regards,
-------Mensagem original-------
Data: 02/04/04 20:39:13
Assunto: RE: [PHP-DB] apache/php/mysql - guarenteed DB transaction
Thanks guys, this is great info.
One last thought,
Suppose I have several DB transactions that I want to treat as 1 logical
transaction that I need to complete guarenteed.
For instance, an INSERT to one table, and a DELETE to another, and an UPDATE
to a third. All need to complete once a user selects submit.
What's the best approach to this scenario?
Thanks in advance for the help,
-----Original Message-----
From: Matt Matijevich [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 04, 2004 11:17 AM
Subject: Re: [PHP-DB] apache/php/mysql - guarenteed DB transaction
Actually whether the script runs through to completion depends on the
'ignore_user_abort' setting.
wow, guess you learn something everyday.
wish I would have known about that when I wrote a php script with some
terrible (lots of joins, just poorly designed) queries that took down my
webserver :(
PHP Database Mailing List (
To unsubscribe, visit:
PHP Database Mailing List (
To unsubscribe, visit:
  IncrediMail - O mundo do correio eletrônico finalmente desenvolveu-se - Clique aqui

Reply via email to