Reverting file back to previous version.  Changes made by routinet break function compatibility, since PHP MySQL uses resource descriptors, and MySQLi uses an object reference.