Welcome Guest, Not a member yet? Register   Sign In
Storing site settings on the server
#8

[eluser]BrianDHall[/eluser]
You could use a custom 'build user preference' function was a little more careful with merging the default and non-default array, as an option.

Not having it so MySQL can operate on it is the primary weakness of the strategy - but as I have no need for such functionality, it isn't a problem Smile If its a must-have then you would of course need a different way of doing it.

For search though, I just use SQL LIKE when I really must, or even use a loop as I don't have many thousands of registered users it isn't very processor intensive.

The advantage of serializing is it is easily expandable, you can just shove another config option in there anytime anywhere. It's easy, simple, and quick. The downside is it isn't robust like using JSON or XML object strategies.

Hm, another option though is using a MySQL table for user preferences, with only 3 fields - preference name, user ID, preference value. So each user preference took up one row in a special table - but the system doesn't care if you create new rules or delete old ones.

Its way more functionality then I've needed for user prefs, and it would be made especially easy with ORM like DMZ - but I just don't have a use for it myself Smile

EDIT: You'd want a 4th field for the index just is just 'id', but that's beside the point.


Messages In This Thread
Storing site settings on the server - by El Forum - 09-21-2009, 08:22 AM
Storing site settings on the server - by El Forum - 09-21-2009, 08:31 AM
Storing site settings on the server - by El Forum - 09-21-2009, 08:39 AM
Storing site settings on the server - by El Forum - 09-21-2009, 08:51 AM
Storing site settings on the server - by El Forum - 09-21-2009, 09:18 AM
Storing site settings on the server - by El Forum - 09-21-2009, 09:42 AM
Storing site settings on the server - by El Forum - 09-21-2009, 09:43 AM
Storing site settings on the server - by El Forum - 09-21-2009, 09:46 AM
Storing site settings on the server - by El Forum - 09-21-2009, 10:48 AM
Storing site settings on the server - by El Forum - 09-21-2009, 10:54 AM
Storing site settings on the server - by El Forum - 09-21-2009, 11:11 AM
Storing site settings on the server - by El Forum - 09-21-2009, 01:48 PM
Storing site settings on the server - by El Forum - 09-21-2009, 02:12 PM
Storing site settings on the server - by El Forum - 09-21-2009, 04:00 PM
Storing site settings on the server - by El Forum - 09-21-2009, 04:08 PM
Storing site settings on the server - by El Forum - 09-21-2009, 04:44 PM
Storing site settings on the server - by El Forum - 09-21-2009, 06:00 PM
Storing site settings on the server - by El Forum - 09-21-2009, 07:00 PM
Storing site settings on the server - by El Forum - 09-22-2009, 01:59 AM
Storing site settings on the server - by El Forum - 09-23-2009, 09:26 AM
Storing site settings on the server - by El Forum - 09-23-2009, 09:37 AM



Theme © iAndrew 2016 - Forum software by © MyBB