mirror of
https://github.com/silverstripe/silverstripe-mssql
synced 2024-10-22 08:05:53 +02:00
MINOR Use $this->query instead of DB::query() for instance MSSQLDatabase::createTable() temp table drop queries
This commit is contained in:
parent
6ae790f3a3
commit
7e01c97e53
@ -339,9 +339,9 @@ class MSSQLDatabase extends SS_Database {
|
||||
$tableName = "#$tableName";
|
||||
// mssql stores temporary tables in the "tempdb" database - we need to drop it first before re-creating it!
|
||||
// We have to do a specific query to do this because it's a special type of table object
|
||||
$drop = DB::query("SELECT 1 FROM tempdb..sysobjects WHERE name LIKE '$tableName%'");
|
||||
$drop = $this->query("SELECT 1 FROM tempdb..sysobjects WHERE name LIKE '$tableName%'");
|
||||
if($drop->value()) {
|
||||
DB::query("DROP TABLE $tableName");
|
||||
$this->query("DROP TABLE $tableName");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user