<?php
run_query("UPDATE " . $config['table_prefix'] . "filter_fields a, " . $config['table_prefix'] . "fields b
    SET def_value = '' WHERE field_id = b.id AND def_value != '' AND 
    (def_value = 'null' OR def_value = default_value OR (def_value = '0,00' AND default_value + 0 = 0) OR (def_value = '0' AND default_value = '{current}'))");