Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 6D9C24758C9 for ; Sat, 9 Nov 2002 10:49:15 -0500 (EST) Received: from wolff.to (unknown [66.93.197.35]) by postgresql.org (Postfix) with SMTP id 8E714475425 for ; Sat, 9 Nov 2002 10:49:14 -0500 (EST) Received: (qmail 18998 invoked by uid 500); 9 Nov 2002 15:59:04 -0000 Date: Sat, 9 Nov 2002 09:59:04 -0600 From: Bruno Wolff III To: Zhidian Du Cc: pgsql-php@postgresql.org Subject: Re: Transaction including two web page + timer Message-ID: <20021109155904.GB18883@wolff.to> Mail-Followup-To: Zhidian Du , pgsql-php@postgresql.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.25i X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/40 X-Sequence-Number: 1622 On Sat, Nov 09, 2002 at 00:04:26 -0700, Zhidian Du wrote: > > I have a question of, when users input some contents in the second page, > then the contents in first and second pages are inserted into tables; > Otherwise, rollback. > > I want to use transction to handle it. > > But when users input the contents in first page, how do I know users have > left( My program will roolback ) or want to continue input sone contents in > the second page (comit)? Usig timer, for example? or some other better > idea. My suggestion would be not to start entering either page until the application has all of the data for both pages. Holding transactions open for long periods of time is not a good idea.