RE: [PHP] simple array in mysql

From: Date: Sat, 12 Oct 2002 03:29:25 +0000
Subject: RE: [PHP] simple array in mysql
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-119713@lists.php.net to get a copy of this message
> What's the 'normal' way of storing array values in mysql table? I like to store one letter of each word in its own table and reference that back to the key of the array which will reference a flat file that stores each key and the file that will store the data for that key on the backup machine. But....the easy way to do it is probably just to serialize() and addslashes() the array and then unserialize() it when you pull it out (no need to stripslashes()). Depends on what you're doing with it, though. You may want to store each array element on it's own row in a table, so it'd be easier to search through. If you're just storing and retrieving, though, and don't need to search the array data, then serialize()/unserialize() is what you want. ---John Holmes...

« previous php.general (#119713) next »