From b484b14be535e0ad30374df9021d321977842b71 Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Wed, 26 May 2010 05:24:15 +0000 Subject: [PATCH] ENHANCEMENT Added MSSQLDatabase::getVersion() to determine the current version of MSSQL in use --- code/MSSQLDatabase.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/code/MSSQLDatabase.php b/code/MSSQLDatabase.php index a3f2f1a..290fce0 100644 --- a/code/MSSQLDatabase.php +++ b/code/MSSQLDatabase.php @@ -188,12 +188,10 @@ class MSSQLDatabase extends SS_Database { /** * Get the version of MSSQL. - * NOTE: not yet implemented for MSSQL, we just return 2008; the minimum supported version - * @return float + * @return string */ public function getVersion() { - user_error("getVersion not implemented", E_USER_WARNING); - return 2008; + return trim($this->query("SELECT CONVERT(char(15), SERVERPROPERTY('ProductVersion'))")->value()); } /**