[PHP] simple array in mysql

2002-10-12 Thread tim tom

What's the 'normal' way of storing array values in mysql table?

--
tim


__
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] simple array in mysql

2002-10-12 Thread John W. Holmes

> 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. 

Butthe 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...



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php