Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 44A5E4767B7 for ; Thu, 5 Sep 2002 03:11:54 -0400 (EDT) Received: from new-smtp1.ihug.com.au (new-smtp1.ihug.com.au [203.109.250.27]) by postgresql.org (Postfix) with ESMTP id 4357C475843 for ; Thu, 5 Sep 2002 03:11:35 -0400 (EDT) Received: from p503-tnt2.mel.ihug.com.au (postgresql.org) [203.173.165.249] by new-smtp1.ihug.com.au with esmtp (Exim 3.22 #1 (Debian)) id 17mqna-0004am-00; Thu, 05 Sep 2002 17:11:31 +1000 Message-ID: <3D7703A1.867530FD@postgresql.org> Date: Thu, 05 Sep 2002 17:11:29 +1000 From: Justin Clift X-Mailer: Mozilla 4.79 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 To: Zhidian Du Cc: "pgsql-php@postgresql.org" Subject: Re: transactions? References: <3D76EE13.9A1B6676@cs.nmsu.edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/17 X-Sequence-Number: 1472 Hi Zhidian, How far have you gotten? For example, have you used databases with PHP before? PostgreSQL has a group of functions in PHP, and generally the first one you use is the pg_pconnect() function, with some parameters to tell it how to connect, where to, etc. Then you can do stuff like execute queries against a database you've already prepared, and so forth. When actually inserting user data, if you need to keep it "as is" but you'd like to be able to display it back at some point, I reckon you'll be interested in the rawurlencode() and rawurldecode() functions. Generally when I code stuff the very first thing that happens is that all external input is made "safe" with rawurlencode() and that's how it gets used internally from there on, that's how it gets stored, etc. The only time it gets rawurldecode()'d is as part of an echo string back to the outside world. Does that help? :-) Regards and best wishes, Justin Clift Zhidian Du wrote: > > I am writing a B/S program. I want to save all the users' inputs, for > example, "insert into TABLE value (.....);" in the server side, how can > I implement in PHP? > > also, how can I use transactions to rollback and commit in PHP? > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org -- "My grandfather once told me that there are two kinds of people: those who work and those who take the credit. He told me to try to be in the first group; there was less competition there." - Indira Gandhi