mirror of
https://github.com/silverstripe/silverstripe-mssql
synced 2024-10-02 06:08:43 +02:00
MINOR Class documentation for MSSQLDatabase
MINOR Code formatting cleanup for MSSQLDatabase::__destruct() MINOR phpDoc for class variables
This commit is contained in:
parent
5eec769564
commit
1ea7a2fec8
@ -1,9 +1,20 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Microsoft SQL Server connector class.
|
* Microsoft SQL Server 2008 connector class.
|
||||||
*
|
*
|
||||||
* @package sapphire
|
* Connecting using Windows:
|
||||||
* @subpackage model
|
* If you've got your website running on Windows, it's highly recommend you
|
||||||
|
* use "sqlsrv", a SQL Server driver for PHP by Microsoft.
|
||||||
|
* @see http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=ccdf728b-1ea0-48a8-a84a-5052214caad9
|
||||||
|
*
|
||||||
|
* Connecting using a UNIX platform:
|
||||||
|
* On other platforms such as Mac OS X and Linux, you'll have to use FreeTDS.
|
||||||
|
* PHP also needs to be built with mssql enabled. This is easy if you use XAMPP,
|
||||||
|
* as it's already included.
|
||||||
|
* If using MacPorts, you can use "port install php5-mssql" if you've already got
|
||||||
|
* the php5 port installed.
|
||||||
|
*
|
||||||
|
* @package mssql
|
||||||
*/
|
*/
|
||||||
class MSSQLDatabase extends Database {
|
class MSSQLDatabase extends Database {
|
||||||
|
|
||||||
@ -26,7 +37,8 @@ class MSSQLDatabase extends Database {
|
|||||||
private $database;
|
private $database;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Does this database have full-text index supprt
|
* Does this database have full-text support?
|
||||||
|
* @var boolean
|
||||||
*/
|
*/
|
||||||
protected $fullTextEnabled = true;
|
protected $fullTextEnabled = true;
|
||||||
|
|
||||||
@ -96,13 +108,13 @@ class MSSQLDatabase extends Database {
|
|||||||
|
|
||||||
public function __destruct() {
|
public function __destruct() {
|
||||||
if(is_resource($this->dbConn)) {
|
if(is_resource($this->dbConn)) {
|
||||||
if($this->mssql) {
|
if($this->mssql) {
|
||||||
mssql_close($this->dbConn);
|
mssql_close($this->dbConn);
|
||||||
} else {
|
} else {
|
||||||
sqlsrv_close($this->dbConn);
|
sqlsrv_close($this->dbConn);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Throw a database error
|
* Throw a database error
|
||||||
|
Loading…
Reference in New Issue
Block a user