switch to mysqli

In order to keep running this I had to bring it forward a decade as far as DB compatibility goes. This isn't perfect but it gets it running on systems that won't let you use the old mysql module.