Re: Transaction problem

Поиск
Список
Период
Сортировка
От x asasaxax
Тема Re: Transaction problem
Дата
Msg-id 91495cb0712040257p6ed56843s7d53bc5491536a03@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Transaction problem  (Cesar Alvarez <c.alvarezx66@gmail.com>)
Ответы Re: Transaction problem  (Bill Moran <wmoran@potentialtech.com>)
Список pgsql-general
Its just use a constraint then? there´s no problem id two sessions decrease the number, and this number goes to less then or equals as zero?
I´m programming with php.


Thanks


2007/12/3, Cesar Alvarez <c.alvarezx66@gmail.com>:
What are you programing with?.
are you using npgsql?

Regards Cesar Alvarez.
> Hi everyone,
>
>    I would like to know how can i do a simple transaction for this
> situation:
>
> I have n products in certain row of a table. When the user buys a
> product,  the quantity of this product will be decreased. The user can
> only buy a product that has a quantity n > 0. This means that when the
> user send the product confirmation to the system, the bd will decrease
> the product quantity with a transaction if the number of product in
> stock is greater than zero.
>
>
> Did anyone knows how can i do that with postgre?
>
> Thanks a lot.



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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: "Suspending" indexes and constraint updates
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: "Suspending" indexes and constraint updates