Jump to content

php and mysql


quickfire84

Recommended Posts

Ok, i have a couple of forms there is one main for and several secondary forms and each form post data into different tables in my one DB once they submit the main form they are given a ID, i am trying to figure out a way i can pull all the data from each table assocated, with a ID?????

Link to comment
Share on other sites

If I am understanding you properly, you will need a reference in all the other tables to that id. So if you have an ID in a users table, if you then have an orders table it will have a field called user_id, which will contain the ID's from the user table that the order originated from.

 

Then just select what you want from the other tables based on the id/foreign key

Link to comment
Share on other sites

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.