Line 25 | Line 25 |
---|
*/ class dbal_mssql extends dbal {
|
*/ class dbal_mssql extends dbal {
|
| var $connect_error = '';
|
/** * Connect to server */ function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false, $new_link = false) {
|
/** * Connect to server */ function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false, $new_link = false) {
|
| if (!function_exists('mssql_connect')) { $this->connect_error = 'mssql_connect function does not exist, is mssql extension installed?'; return $this->sql_error(''); }
|
$this->persistency = $persistency; $this->user = $sqluser; $this->dbname = $database;
| $this->persistency = $persistency; $this->user = $sqluser; $this->dbname = $database;
|
Line 330 | Line 338 |
---|
function sql_escape($msg) { return str_replace(array("'", "\0"), array("''", ''), $msg);
|
function sql_escape($msg) { return str_replace(array("'", "\0"), array("''", ''), $msg);
|
| }
/** * {@inheritDoc} */ function sql_lower_text($column_name) { return "LOWER(SUBSTRING($column_name, 1, DATALENGTH($column_name)))";
|
}
/**
| }
/**
|
Line 346 | Line 362 |
---|
* @access private */ function _sql_error()
|
* @access private */ function _sql_error()
|
| { if (function_exists('mssql_get_last_message'))
|
{ $error = array( 'message' => @mssql_get_last_message(),
|
{ $error = array( 'message' => @mssql_get_last_message(),
|
'code' => ''
| 'code' => '',
|
);
// Get error code number
| );
// Get error code number
|
Line 375 | Line 393 |
---|
$error['message'] .= '<br />' . $row['message']; } @mssql_free_result($result_id);
|
$error['message'] .= '<br />' . $row['message']; } @mssql_free_result($result_id);
|
| } } else { $error = array( 'message' => $this->connect_error, 'code' => '', );
|
}
return $error;
| }
return $error;
|