quickfire84 Posted May 15, 2009 Share Posted May 15, 2009 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 https://forums.phpfreaks.com/topic/158227-php-and-mysql/ Share on other sites More sharing options...
Jibberish Posted May 15, 2009 Share Posted May 15, 2009 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 https://forums.phpfreaks.com/topic/158227-php-and-mysql/#findComment-834575 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.