note 20482 added to function.serialize
| From: | php-general at lists dot php dot net | Date: | Thu, 04 Apr 2002 22:00:26 +0000 |
| Subject: | note 20482 added to function.serialize | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-28638@lists.php.net to get a copy of this message | ||
There is actually a special fieldtype in (My)SQL to store arrays and objects. This type is called
BLOB. It also has a TINY, MEDIUM and LONG variant to suit your space needs. This is actually quite
the same as an TEXTfield (see the manual).
The only difference seems to be that you dont have to add the slashes.
If you just store the serialized object in the database you can pull it back out and unserialize it
without having to add and strip slashes.
I think this is the only use for the BLOB type but a very usefull one.
--
http://www.php.net/manual/en/function.serialize.php
http://master.php.net/manage/user-notes.php?action=edit+20482
http://master.php.net/manage/user-notes.php?action=delete+20482
http://master.php.net/manage/user-notes.php?action=reject+20482