dbk Posted June 9, 2010 Share Posted June 9, 2010 Hi I need som help to joining two tables! Table cases and table contacts When I make a new case I want to connect some contacts by using the contact_id in the contacts table. The contact_id should be saved in a colum case_contacts in the cases table. The big problem I can't figure out is that the colum case_contacts in the cases table have to contain some contact_id's - How do I do that?? Is it possible to seperate the contact_id's some how, like with a ; ?? And how could the query look? Quote Link to comment https://forums.phpfreaks.com/topic/204316-help-with-linking-joining-tables/ Share on other sites More sharing options...
Mchl Posted June 9, 2010 Share Posted June 9, 2010 This looks like many-to-many relationship, so you'll need one more table. http://www.visual-paradigm.com/VPGallery/datamodeling/ManyToManyRelationship.html Quote Link to comment https://forums.phpfreaks.com/topic/204316-help-with-linking-joining-tables/#findComment-1070055 Share on other sites More sharing options...
dbk Posted June 9, 2010 Author Share Posted June 9, 2010 Thanks Mchl! Any good links to some tutorials on this subject? Quote Link to comment https://forums.phpfreaks.com/topic/204316-help-with-linking-joining-tables/#findComment-1070066 Share on other sites More sharing options...
Mchl Posted June 9, 2010 Share Posted June 9, 2010 http://dev.mysql.com/tech-resources/articles/intro-to-normalization.html It's not really covering it, but once you understand normalisation, the many-to-many relationship becomes pretty obvious thing. Quote Link to comment https://forums.phpfreaks.com/topic/204316-help-with-linking-joining-tables/#findComment-1070081 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.