Hello List, I've got a form that inserts data into 2 different tables (all the data pertains to a specific client). One of the tables has an
auto_increment pri key. I want to relate the tables based on the primary key, but can't see how to determine what the auto_incremented value WILL
be in the first table so that I can submit that value (and consequently join the tables) into the second table. I'm using php and have thought of
usrelating mysql tables w/ auto_inc
| From: | eric | Date: | Sat, 01 Jul 2000 22:02:58 +0000 |
| Subject: | Hello List, I've got a form that inserts data into 2 different tables (all the data pertains to a specific client). One of the tables has an auto_increment pri key. I want to relate the tables based on the primary key, but can't see how to determine what the auto_incremented value WILL be in the first table so that I can submit that value (and consequently join the tables) into the second table. I'm using php and have thought of usrelating mysql tables w/ auto_inc |
||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-4305@lists.php.net to get a copy of this message | ||
Hello List,
I've got a form that inserts related data into 2 different tables . One
of the tables has an auto_increment
pri key. I want to relate the tables based on the primary key, but can't
see how to determine what the auto_incremented value WILL be in the
first table so that I can submit that value (and consequently join the
tables) into the second table.
I'm using php and have thought of using mysql_insert_id() + 1, but that
doesn't seem like a good idea.
Anyone?