x2fast Posted February 3, 2008 Share Posted February 3, 2008 Background: For class, we were assigned a "psuedo" project from general mills. Basically something to waste our time, and suck out our lifeforce. Everyone in my group is new to php/phpmyadmin/mysql. XAMPP is installed properly on our machines. All our DB's/tables are set to innoDB. But the default is still set to myisam We are to redesign their recipe database... Question/problem: I can't figure out how to relate 2 database tables....my brain hurts. Example: I currently have 2 databases, recipe_creators and recipe_data and 2 tables members and main (respectively). The primary key for "recipe_creators" table "members" is creator_id. The primary key for "recipe_data" table "main" is recipe_id. I would like to have creator_id be a foreign key in recipe_data table main. When I change creator_id in my "members" table I want it to automatically change in the "main" table in the other database. Can that be done? I apologize if this is in the wrong place. This is a "find your own help" class, the teacher is just a supervisor. Google is a better teacher (and more friendly/doesn't smell as bad). Quote Link to comment https://forums.phpfreaks.com/topic/89243-relate-databases/ Share on other sites More sharing options...
Barand Posted February 4, 2008 Share Posted February 4, 2008 Why separate databases? Quote Link to comment https://forums.phpfreaks.com/topic/89243-relate-databases/#findComment-457178 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.