upgrades mysql() to mysqli()