correctly escape db params in MP functions