Re: how to store arrays in a db?

From: Date: Mon, 19 Jun 2000 17:16:19 +0000
Subject: Re: how to store arrays in a db?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-2225@lists.php.net to get a copy of this message
On Mon, Jun 19, 2000 at 02:09:58PM -0400, Erb, Maria wrote: > thanks so much to everyone who responded to my earlier programming question > with regard to the faculty online office hours scheduling project. I've > taken a good suggestion and created an object to store all the info relating > to the faculty members and the dates and times for their appointments. one > question: how do I store this info in a db? I'm using mysql and when I set > up a test table, i created a field to hold the appointment dates and another > to hold the appointment times. These dates and times are both arrays with > multiple entries. How can these be stored in a db? You can serialize the array, and it will give you a string, which you can then store in the DB in a varchar or text field. -- Chris Moyer -- cmoyer@chekinc.com -- PHP Developer -- Chek.com

« previous php.general (#2225) next »