Jump to content
Larry Ullman's Book Forums

hesedwebdev

Members
  • Posts

    3
  • Joined

  • Last visited

hesedwebdev's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Thank you Antonio. I am glad my last thought was correct, and conceptually I have it, but I am just at the point now of how to make it all work.
  2. I guess I should shed more light. I know I would need something in the models to take the field under departmentId and evaluate if it has the chosen separator (for sake of the example, I will say the separator is ',' [*comma*]) and then break that into an array. Then the relations should run through the array and get all the departments that match those IDs. But since I am obviously new to Yii, I do not know if: A. How or what needs to be edited, OR B. If there is an easier or better way to do this. I have thought about making an employeesDepts table that has individual entries of every departmentId for an employeeId, but then again incorporating this is my difficulty. Any help is greatly appreciated.
  3. Hello, I am working through the tutorial for Yii on the website, and I have setup the Employee and Department models. However, this only addresses if an Employee has 1 department. What would I need to do if I wanted to be able to list multiple departments under the column 'departmentId' separated by commas or pipes, etc?
×
×
  • Create New...