Hi,
I was wondering if there is any way of knowing whether data in a database has been serialized?
I'm working on a Database class which allows the option of inserting a serialized array value into a row on a database. When I run a SELECT query on the database, I want to be able to know if the result should be deserialized before I return it to the model that's requesting it. Or am I just going to have to keep an eye on what I do/don't serialize?
Thanks,
drayfuss
Serielization for MySql
Moderator: General Moderators
Re: Serielization for MySql
All records in a particular field should either be serialized or not. You should never have a field which may or may not contain serialized data.
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: Serielization for MySql
I agree with Benjamin on this. However, for the sake of the issue at hand, a php.net commenter posted a solution to this here.