summaryrefslogtreecommitdiff
path: root/program/include/rcube_mdb2.php
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-01-26 13:45:16 +0000
committeralecpl <alec@alec.pl>2010-01-26 13:45:16 +0000
commit2273d4117fd50ee44dcdaa28fd6444383dc403a0 (patch)
treedc9d429523d816ab8d1d65547f300e4e97fac387 /program/include/rcube_mdb2.php
parent8f85e3759c4eb4b61e8aab2dd4071e429deb81a3 (diff)
- Add support for MDB2's 'sqlsrv' driver (#1486395)
Diffstat (limited to 'program/include/rcube_mdb2.php')
-rw-r--r--program/include/rcube_mdb2.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/program/include/rcube_mdb2.php b/program/include/rcube_mdb2.php
index 5c945d93c..137ffb273 100644
--- a/program/include/rcube_mdb2.php
+++ b/program/include/rcube_mdb2.php
@@ -106,7 +106,7 @@ class rcube_mdb2
if (!filesize($dsn_array['database']) && !empty($this->sqlite_initials))
$this->_sqlite_create_database($dbh, $this->sqlite_initials);
}
- else if ($this->db_provider!='mssql')
+ else if ($this->db_provider!='mssql' && $this->db_provider!='sqlsrv')
$dbh->setCharset('utf8');
return $dbh;
@@ -467,6 +467,7 @@ class rcube_mdb2
switch($this->db_provider)
{
case 'mssql':
+ case 'sqlsrv':
return "getdate()";
default:
@@ -511,6 +512,7 @@ class rcube_mdb2
break;
case 'mssql':
+ case 'sqlsrv':
return "DATEDIFF(second, '19700101', $field) + DATEDIFF(second, GETDATE(), GETUTCDATE())";
default: