[PHP-DB] multiple inserts From: Franklin Hays (frank <email protected>)
Date: 08/13/00

I am trying to insert information from a form into multiple tables of a
database. The HTML Form is composed of two tables with multiple input
fields in each.

I want data from Table 1 in the HTML form to INSERT into table '1' of the
database and information from Table 2 of the HTMl form to INSERT into
table '2' of the database. How can I, if I can, accomplish this.

Please don't tell me to RTFM, If you can find a link in the manual that
explains this then please let me know, I can't.

I have tried the following

$var= "INSERT INTO kayak (length,type,year) VALUES
('$length','$type','$year'),
paddle (lengthp, offset) VALUES ('$lengthp','$offset')";

$result = mysql_query($var);

no luck. I can get it to insert into the first table, kayak, but not the
second. Do I need to break this up into two commands (if so how)?

newbie here so any/all help is greatly appreciated.

TIA,
/frank

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-db-unsubscribe <email protected>
For additional commands, e-mail: php-db-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>