Looking for a recent inserted record
| From: | Jairo Tcatchenco | Date: | Wed, 27 Mar 2002 22:15:11 +0000 |
| Subject: | Looking for a recent inserted record | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-17954@lists.php.net to get a copy of this message | ||
Hi all!
I have two tables. One have the primary key, that is referenced in
the second. When I have to insert a record in both tables, I do this in
the first, following a select to catch the primary key generated. So
then I insert the rest of data in the second table, with the value to
the foreign key. There is a way to do this better. I'm using postgres.
Thanks.
--
Jairo Tcatchenco
jairo@cda.sp.gov.br
Coordenadoria de Defesa Agropecuária - CDA
Secretaria de Agricultura e Abastecimento do Estado de São Paulo -
SAA/SP