|
Posted by Puzzled on 02/13/06 16:59
As part of keeping track of work activity, I store a lot of
information, mostly integer record identifiers, in $_SESSION arrays,
and then save those arrays off to the person's working record in a
MySQL table. I'm doing the save every time the array changes, since I
need to not lose any data if I can help it, and I'm using MyISAM for
speed, since the nature of the activity means constant disc-bashing.
Currently I'm using serialize()/unserialize() to xform the arrays
since that's the canonical practice. But that makes it quite hard to
do a mysql search to see who might have a given value in some
serialized array, and I'd think the generality in those routines must
slow things down quite a bit, though I've not actually tested that. So
I've thought about changing the format and storing them as simple
comma-separated strings instead, using explode()/implode() to do the
xforms.
Is there a consensus on what's the best way to save and restore arrays
of this nature?
Thanks for any insights!
Navigation:
[Reply to this message]
|