Re: Saving arrays to databases?
| From: | Cal Evans | Date: | Tue, 13 Jan 2004 03:14:10 +0000 |
| Subject: | Re: Saving arrays to databases? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-32365@lists.php.net to get a copy of this message | ||
The easy way (but not the recommended way) would be to serialize() the array and then stuff it into a TEXT field for later retrival and unseralize().
This would work if you are just storing the array for later use and don't need to select on it's contents.
Personally, before I would go that route, I would re-exaim your datamodel and see if tere wasn't a way to properly store it.
Let me know how I may be of service,
=C=
* Cal Evans
* http://www.eicc.com
* We take care of your IT,
* So you can take care of your business.
*
* I think inside the sphere.
Jeroen Wasteels wrote:
Is it possible to save an array to a database? And if so, how can I display the entire array when I retreive it from the database? If not, is there some other way to store several data in one colomn/row?