mirror of
https://github.com/silverstripe/silverstripe-mssql
synced 2024-10-22 08:05:53 +02:00
BUGFIX: Fixed MSSQLDatabase::hasTable()
This commit is contained in:
parent
9a1ee37cbd
commit
53156eb94e
@ -1013,7 +1013,9 @@ class MSSQLDatabase extends SS_Database {
|
|||||||
* @todo Make a proper implementation
|
* @todo Make a proper implementation
|
||||||
*/
|
*/
|
||||||
function hasTable($tableName) {
|
function hasTable($tableName) {
|
||||||
return true;
|
$SQL_tableName = Convert::raw2sql($tableName);
|
||||||
|
$value = DB::query("SELECT table_name FROM information_schema.tables WHERE table_name = '$SQL_tableName'")->value();
|
||||||
|
return (bool)$value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user