Changed mysql to mysqli