RE: [PHP] Store array into mysql?

2002-02-14 Thread Rick Emery
PROTECTED] Subject: [PHP] Store array into mysql? Hi! 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=

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

[PHP] Store array into mysql?

2002-02-14 Thread Jan Grafström
Hi! 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 make a string comma