Re: mysql and transactions

From: Date: Fri, 27 Jul 2001 02:14:52 +0000
Subject: Re: mysql and transactions
References: 1 2 3 4 5  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-1082@lists.php.net to get a copy of this message
Oleg Rekutin wrote: > > Stig.Bakken@fast.no (Stig S. Bakken) wrote in > news:3B6094A0.B0ABDE35 > @fast.no: > > > Oleg Rekutin wrote: > >> > >> I am currently using MySQL with transactions and I just use $db->query > >> ("BEGIN WORK"); or "COMMIT" or "ROLLBACK". Works fine > >> for me :) > > > > That means mysql transactions can be implemented in pretty much the same > > way as for pgsql? > > Yes. Note, however, that MySQL has only two table types that support > transactions: BDB and InnoDB. The rest are non-transaction-safe tables. > While I see no big problem with imlpementing somethign like DB_mysql::commit > () as $this->query("COMMIT"), I wonder what should the proper action be in > case of non-transaction-safe tables, which are probably the kinds of tables > in use in 90% of MySQL installations today (blind guess, but you get the > idea). The mysql extension (as all others) has the feature array with the transactions field. To avoid problems the guys who knows that their tables support transactions will want to set this param to true to be able to use transaction methods. :-? Tomas V.V.Cox

« previous php.pear.dev (#1082) next »