You are here: Consensus on how to store arrays? « PHP Programming Language « IT news, forums, messages
Consensus on how to store arrays?

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация