I am currently building a web application for my work and you can add tasks, projects and clients. The dilemma I've encountered is that a client can be assigned to multiple projects at once.
The application is being built upon the latest version of Codeigniter 2.0 (if that helps). I am usually pretty good at working out problems like this, but I can't get my head around this one.
One solution I came up with is to store a list of project ID's for the client in a table field called 'belongs_to' and separate them by comma. Sure this method would work, but it just seems a little messy and I am sure that there is another way, my mind just can't come up with the solution.
Your help is gratefully appreciated.
Why not just have 3 tables:
In this way the third table maps projects and clients in a many to many relationship
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.