db wrapper upgraded to mysqli