picodb(mssql): fix retrieval of DB version on MSSQL

This commit is contained in:
Joe Nahmias 2022-07-13 15:57:15 -04:00 committed by Frédéric Guillot
parent 66d55e5be0
commit 104f492301
1 changed files with 11 additions and 0 deletions

View File

@ -201,4 +201,15 @@ class Mssql extends Base
return $this->getConnection()->query($this->getSqlFromPreparedStatement($sql, $values))->fetchAll(PDO::FETCH_ASSOC); return $this->getConnection()->query($this->getSqlFromPreparedStatement($sql, $values))->fetchAll(PDO::FETCH_ASSOC);
} }
/**
* Get database version
*
* @access public
* @return array
*/
public function getDatabaseVersion()
{
return $this->getConnection()->query('SELECT @@VERSION;')->fetchColumn();
}
} }