RE: [PHP] Store array into mysql?

2002-02-14 Thread Rick Emery
$ser_array = serialize($myarray); then store $ser_array to a table as BLOB, TEXT, or even VARCHAR to use its contents, read it from the table and use unserialize() -Original Message- From: Jan Grafström [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 14, 2002 10:35 AM To: [EMAIL PRO

Re: [PHP] Store array into mysql?

2002-02-14 Thread Andrey Hristov
Hi, if you want to save an array and the structure is not known when you make the database schema definition, you have to serialize(), put the string in the DB, and when you restore it from the DB do unserialize(). Best regards, Andrey Hristov "Back from the exams hellReady to help again.

Re: [PHP] Store array into mysql?

2002-02-14 Thread DL Neil
Hi Jan > I have an array called $myarray and now I want to store it in a mysql table. > I tried to just, insert into mytable values('$id', '$myarray') but just got > Array when I run > while ($row = mysql_fetch_array ($result)) > $myarray= $row[myarray]; > echo $myarray > -- > Do I need to first