MySQL Update Database Field

Evening,

I use Grafana on top of a mysql datebase, What’s the best way to update a field in the database by passing in a variable from the Grafana GUI?

Example query:

Update table
Set field = ‘CLOSED’
Where id = ‘$VARIABLE’;