Re: Postgres & PHP
| From: | (Pavel Janík ml.) | Date: | Mon, 31 Jul 2000 06:43:26 +0000 |
| Subject: | Re: Postgres & PHP | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-1635@lists.php.net to get a copy of this message | ||
From: Alan Todd <Alan.Todd@InfoAve.Net>
Date: Sun, 30 Jul 2000 03:35:14 -0400
Hi,
> What is the proper way to inset values into 2 separate tables example
> when they fill out a form that has a place for username, password,
> first and last name i want user and pass to be entered into the auth
> table and the first and last name to be entered into users table
start transaction, insert values into tables, if INSERT is done OK, commit
transaction if not, rollback transaction.
Hmm, I do not think that two tables for auth purposes are good. Create one
table which will contain everything and CREATE VIEW for username and
password and use this VIEW instead of the second table.
--
Pavel Janík ml.
Pavel@Janik.cz
http://www.janik.cz