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=
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.
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
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
4 matches
Mail list logo