I'm trying to set empty MySQL fields to NULL if all they contain is a line break.
if ($field === '\n') :
$sql = "UPDATE table SET field = NULL
WHERE id = '$id'
";
endif;
For some reason, it does not work. I did check the field, it only contains just one linebreak.
What could be a problem?