[GENERAL] using trigger to change statusin one table from the modification in other table

2011-09-14 Thread Marcos Hercules Santos
Hello guys, i'm trying to use trigger in these two tables below, in order to do the following; To cancel the booking of an accommodation, since the customer do the host (status = Cancelled) in the book_rooms table. Changing the state of accommodation to occupied (Accommodation Table). CREATE

[GENERAL] using trigger to change status in one table from the modification in other table

2011-09-14 Thread Marcos Hercules Santos
Hello guys, i'm trying to use trigger in these two tables below, in order to do the following; To cancel the booking of an accommodation, since the customer do the host (status = Cancelled) in the book_rooms table. Changing the state of accommodation to occupied (Accommodation Table). CREATE

Re: [GENERAL] function on trigger

2011-09-01 Thread Marcos Hercules Santos
On Aug 31, 7:39 pm, Marcos Hercules Santos mhe...@gmail.com wrote: hi guys I'm newbie in Psql and I'm trying to build one function  in order to count the products for each supplier. So i'm gonna put it quite simply though this example Please, consider a table called books with the following

[GENERAL] function on trigger

2011-08-31 Thread Marcos Hercules Santos
hi guys I'm newbie in Psql and I'm trying to build one function in order to count the products for each supplier. So i'm gonna put it quite simply though this example Please, consider a table called books with the following fields bookid, title, price, idPublisher and one another table