Hello everybody, I’m developing a Time Bank ( sorry, cant link it because it’s my first post: en.wikipedia.org/wiki/Time_Banking ) I’ve started for the apprenticeship of IT degree.
I must say this is my first MVC framework and so far it’s far better than i would have expected! Considering that I’m learning MVC architecture and the framework I’m still saving at least half time in developing!
I don’t want to bore you so I’m going to the point now: in this time bank, users are supposed to select categories of services they can be helpful in, and those whom they may need help with. There are 20 category by now in my draft, and they are organized in main categories.
I’m now trying to store them in a class, under components folder, in this way:
These are then needed so that users can select them by check-boxes and store selection in the database, and also select one of them as the category of their offers. The latter one is working pretty good with this method but I’m spending a lot of effort in implementing the first one, specially in the storing and fetching system.
By now I’m trying to use a binary string of 20 booleans and convert it to decimal, then store them in the user table.
The solution is working but looks definitively hackish, fancy and complex. So I wanted to ask if more experts users of this forum have any advice about it.
I’m familiar with java serialization, is it a PHP feature?
I skipped that hypothesis because it would need 20 columns at the moment, and i suppose more categories have yet to come! The only thing that i assume for sure is that they will have 2 levels, categories inside main categories!