public function DatabaseSchema_sqlsrv::EngineVersion in Drupal driver for SQL Server and SQL Azure 7
Same name and namespace in other branches
- 7.3 sqlsrv/schema.inc \DatabaseSchema_sqlsrv::EngineVersion()
- 7.2 sqlsrv/schema.inc \DatabaseSchema_sqlsrv::EngineVersion()
Retrieve Engine Version information.
1 call to DatabaseSchema_sqlsrv::EngineVersion()
- DatabaseSchema_sqlsrv::EngineVersionNumber in sqlsrv/
schema.inc - Retrieve Major Engine Version Number as integer.
File
- sqlsrv/
schema.inc, line 154 - Database schema code for Microsoft SQL Server database servers.
Class
Code
public function EngineVersion() {
$version =& drupal_static(__FUNCTION__);
if (!isset($version)) {
$state = $this->connection->bypassQueryPreprocess;
$this->connection->bypassQueryPreprocess = true;
$version = $this->connection
->query(<<<EOF
SELECT CONVERT (varchar,SERVERPROPERTY('productversion')) AS VERSION,
CONVERT (varchar,SERVERPROPERTY('productlevel')) AS LEVEL,
CONVERT (varchar,SERVERPROPERTY('edition')) AS EDITION
EOF
)
->fetchAssoc();
$this->connection->bypassQueryPreprocess = $state;
}
return $version;
}