X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 193133A42EC for ; Tue, 9 Nov 2004 08:47:25 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 22225-02 for ; Tue, 9 Nov 2004 08:47:17 +0000 (GMT) Received: from ar-sd.net (unknown [82.77.155.72]) by svr1.postgresql.org (Postfix) with ESMTP id 6BBC43A4300 for ; Tue, 9 Nov 2004 08:47:15 +0000 (GMT) Received: from localhost (localhost [127.0.0.1]) by ar-sd.net (Postfix) with ESMTP id E1974E3D0 for ; Tue, 9 Nov 2004 10:49:16 +0200 (EET) Received: from ar-sd.net ([127.0.0.1]) by localhost (linz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 12742-05 for ; Tue, 9 Nov 2004 10:49:15 +0200 (EET) Received: from forge (unknown [192.168.0.11]) by ar-sd.net (Postfix) with SMTP id 6C198E3BA for ; Tue, 9 Nov 2004 10:49:15 +0200 (EET) Message-ID: <014301c4c638$b33af430$0b00a8c0@forge> From: "Andrei Bintintan" To: Subject: A transaction in transaction? Possible? Date: Tue, 9 Nov 2004 10:47:06 +0200 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0140_01C4C649.74D89600" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2720.3000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2727.1300 X-Virus-Scanned: by amavisd-new at ar-sd.net X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.4 tagged_above=0.0 required=5.0 tests=HTML_70_80, HTML_FONTCOLOR_GREEN, HTML_FONTCOLOR_RED, HTML_FONTCOLOR_UNSAFE, HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200411/76 X-Sequence-Number: 19395 This is a multi-part message in MIME format. ------=_NextPart_000_0140_01C4C649.74D89600 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Is it possible to have another transatction in a transaction??? In the = following example the last ROLLBACK is totally ignored(transaction1).=20 //connect to database $database =3D dbConnect($dbhost, $dbuser, $dbpass, $dbname); dbExec($database, "BEGIN"); //transaction1 //* dbExec($database, "BEGIN");//transaction2 $sql =3D "UPDATE orders SET technikernotiz=3D'51' WHERE = id=3D16143"; dbExec($database, $sql); dbExec($database, "COMMIT");//transaction2 /**/ $sql =3D "UPDATE orders SET reklamationsdetail=3D'51' WHERE = id=3D16143"; dbExec($database, $sql); dbExec($database, "ROLLBACK");//transaction1 dbClose($database); ------=_NextPart_000_0140_01C4C649.74D89600 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

Is it possible=20 to have another transatction in a transaction??? In the following = example the=20 last ROLLBACK is totally ignored(transaction1).

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

//*
   =20     dbExec($database, "BEGIN");//transaction2
         &nb= sp; =20 $sql =3D "UPDATE orders SET = technikernotiz=3D'51' WHERE=20 id=3D16143";
        =    =20 dbExec($database, $sql);
    =    =20 dbExec($database, "COMMIT");//transaction2
/**/

    $sql =3D "UPDATE orders SET=20 reklamationsdetail=3D'51' WHERE id=3D16143";
   =20 dbExec($database, $sql);
dbExec($database, = "ROLLBACK");//transaction1

dbClose($database);

 
------=_NextPart_000_0140_01C4C649.74D89600--