Save multiple values in one database config field
Posted: Mon Mar 27, 2006 6:06 am
Hi there,
Im working on a new thingy for usergallery but need to save 34 values into one database config field.
Insane you might say but i have reason.
1. The package i use is coded to have one long strong saved into a single field. So if i create 34 option fields i would have to rewrite SO much code, bleh.
2. Plus i dont want to poison the config table with 34 entries which are nearly never gonna be changed. So for efficiency its best to keep it in one field i think.
3. If for every image clicked over 34 options need to be loaded and checked and reviewed and if positive applied. it would be a slow process.
the string to be saved looks like this
optionname obviously is the option name, and yes or no is whether to show the option (exif tag) or not.
Currently i have all the options a textarea but a radio set is more easy to config for the illiterate user.
So if anyone knows a way to save 34 radiobox or checkbox options into 1 value plz help me out
Im working on a new thingy for usergallery but need to save 34 values into one database config field.
Insane you might say but i have reason.
1. The package i use is coded to have one long strong saved into a single field. So if i create 34 option fields i would have to rewrite SO much code, bleh.
2. Plus i dont want to poison the config table with 34 entries which are nearly never gonna be changed. So for efficiency its best to keep it in one field i think.
3. If for every image clicked over 34 options need to be loaded and checked and reviewed and if positive applied. it would be a slow process.
the string to be saved looks like this
Code: Select all
optionname-yes,optionname2-yes,optionname3-no etc.Currently i have all the options a textarea but a radio set is more easy to config for the illiterate user.
So if anyone knows a way to save 34 radiobox or checkbox options into 1 value plz help me out