I would imagine because the output of unserialize() is of the array type. Unless, there was an error unserializing it.I have an array of values I want to store in a MySQL db in a column called readBy of type TEXT. I want to take that array and serialize it then insert it into the db. No big deal. When I query the db and get the value from the readBy column, I know I have to unserialize it. Again, no big deal.
My question about all of this is once I unserialize the data from the
column, can I immediately use the array_push() function to append additional
data to the unserialized data?
Will the unserialized data immediately beYes.
recognized/treated as an array?
If you can guarantee that the data doesn't go above 256 characters, then a varchar column can be used.Also, is the TEXT dolumn type an appropriate column type to store serialized data or is there another column type that should be used?
But serialized data can get pretty big, so anticipate for it, by using text columns.
-- Gerard Samuel http://www.trini0.org:81/ http://test1.trini0.org:81/
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php