Location: PHPKode > scripts > DLog > dlog/dlog_mssql.php
<?php
/**
 * dlog_mssql.php - Class dlog extension with support to MSSQL
 * $Header: d:\\cvs/classistd/dlog/dlog_mssql.php,v 1.4 2003/04/29 05:55:37 darvin Exp $
 */

require_once('dlog.php');

class dlog_mssql extends dlog {
/**
 * Open the database connection
 * MSSQL version
 * @access private
 */
function OpenDb() {
     if($this->DBOpen) return;
     $this->DbConn=mssql_connect($GLOBALS['dlog_DbSystem'],$GLOBALS['dlog_DbUser'],$GLOBALS['dlog_DbPassword'])
                         or die($this->InternalError('Error during connection to database server',__FILE__,__LINE__));
     mssql_select_db($GLOBALS['dlog_Dbname'],$this->DbConn)
          or die($this->InternalError('Error during selection of database '.$GLOBALS['dlog_Dbname'],__FILE__,__LINE__));
     $this->DBOpen=TRUE;
}

/**
 * Execute a generic sql statement on the open conection
 * MSSQL version
 * @access private
 * @parameter char sql
 */
function DbExec($sql) {
     $this->OpenDb();
     mssql_query($sql,$this->DbConn)
          or die($this->InternalError('Sql error. sql:' .$sql,__FILE__,__LINE__));
}

}

?>
Return current item: DLog