you could use a simple assoc. array for all the user's information,
and store that serialized in the database rather than serialize
the entire object.

that way, you'd have to store less information in the DB,
and wouldnt have to worry about breaking any of your code
in the future (or the object becoming unuseable after being
put into the database)

i dont know how you've got the whole thing setup right now,
but i'd imagine that it'll save you a great deal of work
to only deal with serialized data and not serialized objects.

> -----Original Message-----
> From: Michael Champagne [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 09, 2001 10:58 AM
> To: PHP General Mailing List
> Subject: [PHP] Storing serialized classes in database
> 
> 
> We are writing a series of applications which will store a user 'profile'
> between sessions as a serialized object in our Oracle database.  We're storing
> data like the output format a user prefers file downloads in and things like
> that.  If have to add certain things to this class, I'm assuming the
> serialized objects in the database become unusable.  Does anyone have a good
> solution for this?  I suppose we could go through the database and somehow
> convert these serialized 'profiles' to meet the new class spec.  How much of a
> hassle is that?
> 
> Thanks in advance for any responses,
> 
> Michael Champagne, Software Engineer
> Capital Institutional Services, Inc.
> wk: [EMAIL PROTECTED]
> hm: [EMAIL PROTECTED]
> 
> 
> 
> ******************************************************************
> This communication is for informational purposes only.  It is not
> intended as an offer or solicitation for the purchase or sale of 
> any financial instrument or as an official confirmation of any 
> transaction, unless specifically agreed otherwise.  All market 
> prices, data and other information are not warranted as to 
> completeness or accuracy and are subject to change without
> notice.  Any comments or statements made herein do not 
> necessarily reflect the views or opinions of Capital Institutional
> Services, Inc.  Capital Institutional Services, Inc. accepts no
> liability for any errors or omissions arising as a result of
> transmission.  Use of this communication by other than intended
> recipients is prohibited.
> ******************************************************************
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to