php Transaction question
| From: | Randy Johnson | Date: | Tue, 20 Aug 2002 14:14:08 +0000 |
| Subject: | php Transaction question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-113324@lists.php.net to get a copy of this message | ||
I know I saw this somewhere before but cannot find the answer
In a php/mysql script how do a do a transaction
is it like this or is their a better way to do it?
innodb table method
$query="set autocommitt=0;"
mysql_query($query);
$query="select blah from blah;";
mysql_query($query);
$query="update blah where blah;";
mysql_query($query);
$query="committ;";
mysql_query($query);
Thanks
Randy