I would like to only update a value if it isn't null or an empty string, but i've tried everything from `COALESCE(new_value, old_value)` to `COALESCE(NullIf(RTrim(new_value),'')old_value)`.

I'm completely lost for ideas and I've been browsing the internet for a solution, but I can't find anything that works for me.

```
$query = "UPDATE Person SET fornavn=COALESCE($escapedFornavn,fornavn), efternavn='$escapedEfternavn', alder='$escapedAlder', email='$escapedEmail', adresse='$escapedAdresse', telefon=$escapedTelefon WHERE brugernavn='$brugernavn'; ";

```

I want the query above to only update each value if the user has typed in a value in a form, if the form is empty it should just use the old value.