RE: Using MySQL Inno DB transaction

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I would think that it all has to occur in one script since the db connection is closed with an implicit commit when the page ends

bastien

From: Arie Nugraha <dicarve@xxxxxxxxx>
Reply-To: Arie Nugraha <dicarve@xxxxxxxxx>
To: php-db@xxxxxxxxxxxxx
Subject:  Using MySQL Inno DB transaction
Date: Tue, 12 Jul 2005 16:37:56 +0700

Lately i'm building a library automation application with php 5 and MySQL 4..1.

For the transaction module, i'm using Inno DB engine to store the
transaction data, cos i want to use MySQL transaction method which can
be commit or rollback.

But when i tried to rollback the transaction in the other script, the
data still exist in the database.

script1.php :
<?php
$mysqli = new mysqli(...);

$mysqli->autocommit(false);
// do the transaction
// and process it in script2.php
?>


script2.php
<?php
$mysqli->rollback();
?>

What's wrong?? does anybody could help me?? Thanks

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux