예제 #1
0
* Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the Creative Commons Attribution 3.0 License for more details. 
* You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin, 
* see license.txt file; if not, write to marketing@boonex.com
***************************************************************************/
require_once "header.inc.php";
require_once BX_DIRECTORY_PATH_INC . 'utils.inc.php';
define('DB_FULL_VISUAL_PROCESSING', true);
define('DB_FULL_DEBUG_MODE', false);
define('DB_DO_EMAIL_ERROR_REPORT', true);
$MySQL = new CMySQL();
if (!$MySQL->connect()) {
    genMySQLErr('Database connect failed');
}
if (!$MySQL->select_db()) {
    genMySQLErr('Database select failed');
}
db_res("SET NAMES 'utf8'");
$cacheParam = array();
class CMySQL
{
    var $host = DATABASE_HOST;
    var $sock = DATABASE_SOCK;
    var $port = DATABASE_PORT;
    var $user = DATABASE_USER;
    var $passwd = DATABASE_PASS;
    var $db = DATABASE_NAME;
    var $connected = false;
    var $link = null;
    function connect()