ENHANCEMENT Added MSSQLDatabase::getVersion() to determine the current version of MSSQL in use

This commit is contained in:
Sean Harvey 2010-05-26 05:24:15 +00:00
parent 5ad91ce0ed
commit b484b14be5

View File

@ -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());
}
/**