Red2034 Posted January 31, 2014 Share Posted January 31, 2014 I have a 'masterList' table that hold all the records of items (obvious) - then I have a 'myList' table that holds all my items I have selected... this is working well - but I was short-sighted in my design because now I want to add many other users that can choose from the 'masterList' let's call then 'employees'. Question - what is now the best way to structure the hierarchy for the many users that will make their own 'myList'??? Thanks for the advice! Quote Link to comment https://forums.phpfreaks.com/topic/285835-questions-about-mysql-hierarchy/ Share on other sites More sharing options...
requinix Posted January 31, 2014 Share Posted January 31, 2014 Add something to the myList table that indicates, for each row, who it belongs to. Then put all the users' selections in there. Quote Link to comment https://forums.phpfreaks.com/topic/285835-questions-about-mysql-hierarchy/#findComment-1467250 Share on other sites More sharing options...
Red2034 Posted January 31, 2014 Author Share Posted January 31, 2014 multiple 'employees' can have the same item - is it possible to list more than one 'employee_ID' in a row or record? Quote Link to comment https://forums.phpfreaks.com/topic/285835-questions-about-mysql-hierarchy/#findComment-1467255 Share on other sites More sharing options...
kicken Posted January 31, 2014 Share Posted January 31, 2014 You would have a separate row for each employee and item combination. So if three people all selected ItemA you'd have three rows: employee | ItemID ------------------- Alice | ItemA Billy | ItemA Cassy | ItemA Quote Link to comment https://forums.phpfreaks.com/topic/285835-questions-about-mysql-hierarchy/#findComment-1467260 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.