Array problem

A

Anonymous

Guest
i use serialize() to convert an array and then store in a field called 'parts' in table name 'custom', when i retrieve the value from db, i get back the value and i use unserialize(), to convert back, when i view back the variable, it is nothing, it doesnt work, how? any problem? thanks

$conn = @mysql_pconnect("localhost", "tan", "");
$sql = "select * from custom where CustomID = '$ID'";
$result = mysql_query($sql, $conn);
$qry = mysql_fetch_array($result);

$custom= $qry[parts];
echo $custom;
$custom = unserialize($custom);
echo $custom;
 
You already posted this, kiwi. There's no reason you should be posting it again.
 
Back
Top