From: | Thom Dyson <TDyson(at)sybex(dot)com> |
---|---|
To: | Roni Warken <rwarken(at)gmail(dot)com> |
Cc: | pgsql-php(at)postgresql(dot)org |
Subject: | Re: last value |
Date: | 2005-05-04 13:19:06 |
Message-ID: | OFD92A21B5.43E3F8CD-ON88256FF7.00490221-88256FF7.004929D9@sybex.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-php |
Since this is a data integrity question (I presume) as much as an
application question, you could put a trigger on the 1st table that says,
"when a new record is added, seed data in other tables". I have it at
work. If you need more info, let me know.
Thom Dyson
Director of Information Services
Sybex, Inc.
pgsql-php-owner(at)postgresql(dot)org wrote on 05/04/2005 09:18:12 AM:
> I tried to search some thread that could help me, but didn't find
> anything (maybe because I didn't know how to search).
> I have a script that insert some values in a table. After this, I have
> to take the value of the primary key just inserted, and insert it in
> another table, all in the same script.
> How can I do that? Or if you have a better idea of how to get the last
> value and insert in the other table, please tell me.
> Thanks.
> --
> Roni Warken
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
From | Date | Subject | |
---|---|---|---|
Next Message | moalaniz | 2005-05-04 13:19:33 | Re: last value |
Previous Message | Pawel Bernat | 2005-05-04 13:09:33 | Re: last value |