updated to mysqli version