To me it sounds like Tools, Equipment and Supplies are all "items" that a user can select. Have you thought about placing them all into one table like "equipment" and then create a new table called "categories". Then store the categories primary id as the foreign key "catetgory_id" in the " equipment table.
On Mar 20, 9:35 pm, "Dave Maharaj :: WidePixels.com" <d...@widepixels.com> wrote: > I have 3 tables with various options a user can select which are all HABTM > (TOOLS ->hammer, measuring tape, level, screwdriver.......) > (EQUIPMENTS ->drill, saw, router .......) > (SUPPLIES ->nails, screws, bolts.......) > > If I made a table called CATEGORIES (id title) > > Could or should I put them all in one table such as OPTIONS and break them > into groups such as > OPTIONS TABLE > id > category_id > title > > so tools in the db look like > 1 1 hammer > 2 1 measuring tape > 3 1 screwdriver > 4 2 drill > 5 2 saw > 6 2 router > 7 3 nails > 8 3 screws > 9 3 bolts > > Rather than having extra tables put them all into one? > And if I do that can I then display them in sections when using the echo > $form->input('Option',array('multiple'=>'checkbox')); if I added a category > => whatever I wanted to display? > > Thanks guys > > Dave --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---