Re: sql insert into 2 tables
| From: | Larry E . Ullman | Date: | Sun, 28 Nov 2004 21:30:45 +0000 |
| Subject: | Re: sql insert into 2 tables | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-203030@lists.php.net to get a copy of this message | ||
Hi there - I was wondering if anyone could point me in the right direction to be able to add data to two different tables (I am using mysql and php V4). I understand joins, etc for the query of the data, however adding the data - still getting my head wrapped around it (multiple tables).You'll need to run separate INSERT queries, I suspect. If one query relies upon a primary key created by the other, make use of the mysql_insert_id() function. Larry