Jump to content

Recommended Posts

Hi Guys,

 

Hoping you can help me out here I have a large form that is acting as an order log there are 4 parts to the form, customer details, shipping details, order details and then the parts section I need to insert all the data into their respective tables with the ID's linking all of them together for searching? I have the form done I'm just stuck on the inserting portion at the moment.

 

Any help is greatly appreciated.

 

Thanks in Advance.

Link to comment
https://forums.phpfreaks.com/topic/157620-inserting-fields-into-multiple-tables/
Share on other sites

Ok Well as I understand it I need to have a customer_id field in the customer table, a shipping_id field in the shipping table and a order_id field in the order table all as primary keys, now in order for me to bring up when searching all the parts associated with an order i need the order_id to be inserted into the parts table and the customer and shipping id's to be inserted into the order table so that all the info comes up when searched for, so if on the first insert query the customer_id is generated how do i insert that into the order table?

 

hope that all makes sense.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.