RE: [PHP-DB] Stupid question=p
| From: | Sam Masiello | Date: | Mon, 17 Sep 2001 15:36:58 +0000 |
| Subject: | RE: [PHP-DB] Stupid question=p | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-12502@lists.php.net to get a copy of this message | ||
You can't store the array as an array, but what you can do is serialize
the array to create a string, then store THAT in the database.
For example:
$myarray = your array of stuff;
$myserializedarray = serialize($myarray) ;
$myserialized array is now a string that you can store in the database.
When you pull it out of the database, you can use the unserialize()
function to turn it back into an array.
See http://www.php.net/serialize for more information.
HTH
Sam Masiello
Software Quality Assurance Engineer
Synacor
(716) 853-1362 X289
smasiello@synacor.com
-----Original Message-----
From: Glenn B. [mailto:gbridgm1@maine.rr.com]
Sent: Sunday, September 16, 2001 3:44 PM
To: php-db@lists.php.net
Subject: [PHP-DB] Stupid question=p
Am I able to make a field an array in MySQL? Thanks.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
For additional commands, e-mail: php-db-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net