Re: transactions?

Поиск
Список
Период
Сортировка
От Justin Clift
Тема Re: transactions?
Дата
Msg-id 3D7703A1.867530FD@postgresql.org
обсуждение исходный текст
Ответ на transactions?  (Zhidian Du <zdu@cs.nmsu.edu>)
Ответы Re: transactions?  (Harry Waddell <waddell@caravan.com>)
Список pgsql-php
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

В списке pgsql-php по дате отправления:

Предыдущее
От: Zhidian Du
Дата:
Сообщение: transactions?
Следующее
От: Harry Waddell
Дата:
Сообщение: Re: transactions?