Search Postgresql Archives

Re: Transaction problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

begin:vcard
fn:Cesar Alvarez
n:;Cesar Alvarez
title:Web Development Asesor and Software Enginner
version:2.1
end:vcard

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux