changing mysql to mysqli