I need to figure out the best way to implement how to add note to an item. Here's how it it structured right now:
-projectID
|
|- groupA
| |-- item 1
| |-- item 2
| |-- item 3
|
|- groupB
| |-- item 1
| |-- item 2
| |-- item 3
User can create a note and post it under:
- entire project
- Entire Group
- Select items in any group
I have no problem with when entire project is selected or a whole group A or B.
I can just create a db table with a field
t1.note / ENUM('', 'all', 'groupA', 'groupB')
However, if the user selects random items from groups I will get values in the following array:
Array ( [project] => 293 [ccID] => [groupA] => Array ( [899] => 899 [900] => 900 [901] => 901 ) [groupB] => Array ( [17] => 17 ) )
or if the select some from groupA and all groupB I'll get the following:
Array ( [cp] => 293[ccID] => [groupA] => Array ( [899] => 899 [900] => 900 [901] => 901 ) [crGroup] => Array ( [001] => groupB [18] => 18 [17] => 17 ) )
Anyway, I'm starting to loose focus here. What is the better way to store values?
I suppose I need to have 3 cells and save something like:
t1.note / ENUM('', 'all', 'groupA', 'groupB')
t1.groupA 899,900,901
t1.groupB 17,18