Converted the whole project to mysqli