$id = 123456;
$name = "Mc' Onail Lafayard";
$notes= " He is 'Bad Boy' ";
is_numeric($id) or die( "ID is not numeric" );
echo "update table
set note='".$db->real_escape_string($notes)."'
, nm='".$db->real_escape_string($name)."'
where id = ".(int)$id;