Re: Add data to three tables at once from one form
| From: | Steve Werby | Date: | Fri, 20 Apr 2001 13:40:32 +0000 |
| Subject: | Re: Add data to three tables at once from one form | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-49556@lists.php.net to get a copy of this message | ||
"Julian Wood" <woodj@ucalgary.ca> wrote:
> > That's it. There's nothing special to do.
>
> Except if one insert fails and the others succeed, you run into a bit of
> sync trouble. This is what transactions are for. You might want to
consider
> a BDB table type, which supports transactions, then you have the option to
> rollback the other inserts if one of them fails.
Good point. I assumed that if the original poster didn't know how to
accomplish 3 DB inserts within a PHP script then transactions and rollbacks
were a little too advanced to get into (and the DB being used was never
stated).
--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/