javascript helper and msql2 adapter