I don't understand what the problem is. Set id to autoincrement. Insert that record. The use last_insert_id (i think thats it) to get the ID of the record you just inserted and use it when adding order_products. No chicken and egg here. Maybe I missed where you think the delima is.
In reply to Re: Inserting into several linked MySQL tables.
by eric256
in thread Inserting into several linked MySQL tables.
by techcode
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |