Updated for MySQLi PHP Plugin

Rather than using the soon deprecated PHP MySQL functions, ZQL now uses
MySQLi.