NYCPHP Meetup

NYPHP.org

[nycphp-talk] Is serializing object/arrays for MySQL reliable?

Daniel Convissor danielc at analysisandsolutions.com
Mon Oct 23 13:37:14 EDT 2006


Hi Cliff:

On Sun, Oct 22, 2006 at 07:08:11AM -0400, Cliff Hirsch wrote:
> Is serializing/unserializing object/arrays for storage/retrieval in a
> MySQL db truly reliable?

Depends on what you're doing.  We use them to store history.  For example, 
our update method finds the diff between the old and new data.  The diff 
contains the old values that are about to be changed, in an associative 
array format with column names as the keys.  We then serialize that and 
store it in a history table along with the record id and table name.

--Dan

-- 
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
            data intensive web and database programming
                http://www.AnalysisAndSolutions.com/
 4015 7th Ave #4, Brooklyn NY 11232  v: 718-854-0335 f: 718-854-0409



More information about the talk mailing list