[ticket/10003] Ported 1802b9ff92 to db_tools.

Most of it was already in db_tools, these changes could have applied to
code that did not exist in db_tools at the time of the commit.

PHPBB3-10003
This commit is contained in:
Oleg Pudeyev 2011-04-29 01:46:01 -04:00
parent 55ff5da70b
commit 85549fad83

View file

@ -1130,7 +1130,7 @@ class phpbb_db_tools
*/ */
function sql_index_exists($table_name, $index_name) function sql_index_exists($table_name, $index_name)
{ {
if ($this->sql_layer == 'mssql') if ($this->sql_layer == 'mssql' || $this->sql_layer == 'mssqlnative')
{ {
$sql = "EXEC sp_statistics '$table_name'"; $sql = "EXEC sp_statistics '$table_name'";
$result = $this->db->sql_query($sql); $result = $this->db->sql_query($sql);
@ -1235,7 +1235,7 @@ class phpbb_db_tools
*/ */
function sql_unique_index_exists($table_name, $index_name) function sql_unique_index_exists($table_name, $index_name)
{ {
if ($this->sql_layer == 'mssql') if ($this->sql_layer == 'mssql' || $this->sql_layer == 'mssqlnative')
{ {
$sql = "EXEC sp_statistics '$table_name'"; $sql = "EXEC sp_statistics '$table_name'";
$result = $this->db->sql_query($sql); $result = $this->db->sql_query($sql);