Re: key pairs
| From: | Ashley M. Kirchner | Date: | Tue, 17 Dec 2002 20:25:41 +0000 |
| Subject: | Re: key pairs | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-128604@lists.php.net to get a copy of this message | ||
Tim Ward wrote:
1. Have an order_id on the first table (or a separate ORDER table) that is INT and AUTO_INCREMENT. 2. Have an order_id on the other table(s) that is INT but not AUTO_INCREMENT. 3. Create the record in the first table just inserting the info you get in. 4. get the order_id just created using mysql_insert_id(). 5. insert the data into the other table(s) with this order_id(). Thanks, but that wasn't the question - I know this part. :)I need a routine to run through the data and generate the key pairs for insertion in the DB. -- W | I haven't lost my mind; it's backed up on tape somewhere. +-------------------------------------------------------------------- Ashley M. Kirchner <mailto:ashley@pcraft.com> . 303.442.6410 x130 IT Director / SysAdmin / WebSmith . 800.441.3873 x130 Photo Craft Laboratories, Inc. . 3550 Arapahoe Ave. #6 http://www.pcraft.com ..... . . . Boulder, CO 80303, U.S.A.