mirror of
https://github.com/silverstripe/silverstripe-mssql
synced 2024-10-22 08:05:53 +02:00
BUGFIX Renamed MSSQLQuery::destroy() renamed to destruct() so that it is called properly after the object is destroyed
This commit is contained in:
parent
35d04ac387
commit
ae1494c313
@ -1595,13 +1595,15 @@ class MSSQLQuery extends SS_Query {
|
|||||||
$this->mssql = $mssql;
|
$this->mssql = $mssql;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function __destroy() {
|
public function __destruct() {
|
||||||
|
if(is_resource($this->handle)) {
|
||||||
if($this->mssql) {
|
if($this->mssql) {
|
||||||
mssql_free_result($this->handle);
|
mssql_free_result($this->handle);
|
||||||
} else {
|
} else {
|
||||||
sqlsrv_free_stmt($this->handle);
|
sqlsrv_free_stmt($this->handle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function seek($row) {
|
public function seek($row) {
|
||||||
if(!is_resource($this->handle)) return false;
|
if(!is_resource($this->handle)) return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user