At 8:55 -0400 6/21/02, Steve Bradwell wrote:
>So should I be using Innodb tables or BDB tables?

You have to be using *some* kind of transaction-safe tables (InnoDB
and BDB qualify).  If you use a table type like MyISAM, then all
statements are committed as they execute, and use of a transaction
has no meaning.

Also, another way to perform a transaction (besides that shown below)
is to use BEGIN to begin it and COMMIT or ROLLBACK to end it.
The difference is that you don't need to modify the AUTOCOMMIT
mode explicitly; BEGIN suspends it temporarily until the transaction
has been ended with COMMIT or ROLLBACK.

>-----Original Message-----
>From: Michael Bretterklieber [mailto:[EMAIL PROTECTED]]
>Sent: Friday, June 21, 2002 2:49 AM
>To: Php-Db (E-mail)
>Subject: Re: [PHP-DB] Innodb and transactions.
>you have to do something like this:
>mysql_query('SET AUTOCOMMIT=0');
>mysql_query('COMMIT'); or mysql_query('ROLLBACK');
>mysql_query('SET AUTOCOMMIT=1');
>Steve Bradwell schrieb:
>>  Hi all,
>>  I have just figured out and set up my Innodb on my mysql server so I can
>>  transactions Begin, commit, rollback. I'm now looking for examples on how
>>  do this with php. I hit the php site and the best I could find was
>>  fbsql_commit etc... is this what I'm looking for? There's no documentation
>>  yet. I'm using php4 with mysql 3.23.49-max, and my tables are Innodb.
>>  I appologize if my lingo is somewhat confusing or just wrong but I'm
>>  new to this stuff.
>>  Any input or examples would be greatly appreciated.
>>  Thanks,
>>  Steve.
>  >
>Michael Bretterklieber
>JAWA Management Software GmbH
>Liebenauer Hauptstr. 200
>A-8041 GRAZ
>Tel: ++43-(0)316-403274-12
>Fax: ++43-(0)316-403274-10
>GSM: ++43-(0)676-93 96 698
>--------- privat -----------
>"...the number of UNIX installations has grown to 10, with more expected..."
>          - Dennis Ritchie and Ken Thompson, June 1972

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to