1,6 → 1,6 |
<?php |
|
require_once 'lib/Db/Database.php'; |
require_once __DIR__ . '/Database.php'; |
|
class ODBCDB extends Database |
{ |
12,38 → 12,13 |
|
public function __construct() |
{ |
$this->_connection = @odbc_connect($this->_alias, "" ,""); |
// $this->_connection = @odbc_connect($this->_alias, $this->_username, $this->_password); |
$this->_dsn = 'odbc:' . $this->_alias; |
parent::__construct(); |
} |
|
/** |
* Escapes a database name so that it can be used in a query. |
* |
* @param string $name |
* The name to be escaped |
* @return string |
* The escaped name |
*/ |
public function escapeName($name) |
{ |
return '[' . $name . ']'; |
} |
|
/** |
* (non-PHPdoc) |
* @see Database::_escapeAliasArray() |
*/ |
protected function _escapeAliasArray(array &$array) |
{ |
foreach ($array as $column => &$value) |
{ |
$value = $value . ' AS [' . $column . ']'; |
} |
|
return $array; |
} |
|
/** |
* (non-PHPdoc) |
* @see Database::_escapeValueArray() |
*/ |
protected function _escapeValueArray(array &$array, $suffix = '', array &$escape = array('`', '`')) |