Do I need to escape my object data if I'm serializing for mysql injection?
ie:
class Object
{
public $description;
}
$obj = new Object();
$obj->description = mysql_real_escape_string("this is my crazy string with lot's of bad // characters");
$data = serialize($obj); // <-- $data will be stored in DB
or will this suffice:
class Object
{
public $description;
}
$obj = new Object();
$obj->description = "this is my crazy string with lot's of bad // characters";
$data = serialize($obj);