RE: [PHP] Add data to three tables at once from one form

From: Date: Thu, 19 Apr 2001 00:33:33 +0000
Subject: RE: [PHP] Add data to three tables at once from one form
Groups: php.general 
Request: Send a blank email to php-general+get-49291@lists.php.net to get a copy of this message
> Add two more sets of statements like those you have for the > first query. That's it. There's nothing special to do. MySQL also lets you stack insert statements: $sql="INSERT INTO t1 ('A'); INSERT INTO t2 ('B'); INSERT INTO t3 ('C');" This would work (but if you get an error, you'll have trouble debugging it. It'll also save minutely on execution since it only needs to call mysql_query once instead of three times. I prefer to use three explicit statements and query calls. Jason

« previous php.general (#49291) next »