i'm tyring to do an UPDATE on a field and i want to put a serialized string.... so it includes double quotes and others weird symbols.... so it's breaking my sql query
how can i solve this? i need to preserve the syntax of my serialized string with the double quotes intact or else it wont work right
here is the code:
$a = $row["options"];
$ary = unserialize($a);
$ary[] = $title;
$b = serialize($ary);
$zxc = "UPDATE quebec_calendarcustomfield SET options = '$b' WHERE calendarcustomfieldid = '1'";
so the sql query will look like this
UPDATE quebec_calendarcustomfield SET options = 'a:4:{i:1;s:7:"option1";i:2;s:7:"option2";i:3;s:7:"option3";i:4;s:3:"etc";}' WHERE calendarcustomfieldid = '1'
see?