Andrei Bintintan wrote:
//Is it possible to have another transatction in a transaction??? In the following example the last ROLLBACK is totally ignored(transaction1).

///connect to database/
$database = dbConnect($dbhost, $dbuser, $dbpass, $dbname);
dbExec($database, "BEGIN"); //transaction1

///*/
/    /    dbExec($database, "BEGIN");//transaction2
            $sql = "UPDATE orders SET technikernotiz='51' WHERE id=16143";
            dbExec($database, $sql);
        dbExec($database, "COMMIT");//transaction2
//**/
/
    $sql = "UPDATE orders SET reklamationsdetail='51' WHERE id=16143";
    dbExec($database, $sql);
dbExec($database, "ROLLBACK");//transaction1

dbClose($database);

This appears to be the same as Oracle's "autonomous transactions", fwiw.

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Reply via email to