X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 10DF49DC835 for ; Sat, 25 Feb 2006 22:51:25 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 17340-03 for ; Sat, 25 Feb 2006 22:51:29 -0400 (AST) Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id D5C619DC82D for ; Sat, 25 Feb 2006 22:51:22 -0400 (AST) Received: from hotmail.com (bay104-f2.bay104.hotmail.com [65.54.175.12]) by svr4.postgresql.org (Postfix) with ESMTP id 1FE3C5AF0AB for ; Sun, 26 Feb 2006 02:51:28 +0000 (GMT) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Sat, 25 Feb 2006 18:51:25 -0800 Message-ID: Received: from 65.54.175.200 by by104fd.bay104.hotmail.msn.com with HTTP; Sun, 26 Feb 2006 02:51:22 GMT X-Originating-IP: [64.34.65.140] X-Originating-Email: [enediel@hotmail.com] X-Sender: enediel@hotmail.com In-Reply-To: <20060226023451.D83171B8089@mx1.hub.org> From: "enediel gonzalez" To: pgsql-php@postgresql.org Subject: postgresql 7.3 php transaction problem Date: Sun, 26 Feb 2006 02:51:22 +0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-OriginalArrivalTime: 26 Feb 2006 02:51:25.0951 (UTC) FILETIME=[88F2D0F0:01C63A7F] X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=1.919 required=5 tests=[DNS_FROM_RFC_ABUSE=0.479, DNS_FROM_RFC_POST=1.44, MSGID_FROM_MTA_HEADER=0] X-Spam-Score: 1.919 X-Spam-Level: * X-Archive-Number: 200602/27 X-Sequence-Number: 3443 Hello I need a complex transaction that should update some database tables. The updated tables inside the transaction should be used also to find information during the transaction process. BEGIN (I created the transaction) First iteration i(0) I created a record into the 'products_inventory' table (sucess) Second iteration i(1) select pk from products_inventory where (nu_product = 4) and (serial_number = '9087') and (quantity > 0) Warning: pg_query(): Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block this query fails on the second iteration (the query is sintactically correct. I tried to create a whole batch to lauch the transaction completelly in the following form BEGIN; statement; statement; statement; ... COMMIT; launching the script from the php page fails, but taking the same script and using phppgadmin, the same script sucess. Another question about transactions in postgresql ?Is it possible inside the transaction to see the changes ocurred into the database ,resulting of the previous statements executed on the same transaction? Thanks in advance for any help or explanation Regards Enediel