summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/mssql/mssql_utility.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/database/drivers/mssql/mssql_utility.php')
-rw-r--r--system/database/drivers/mssql/mssql_utility.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/system/database/drivers/mssql/mssql_utility.php b/system/database/drivers/mssql/mssql_utility.php
index 5c144330d..06581f772 100644
--- a/system/database/drivers/mssql/mssql_utility.php
+++ b/system/database/drivers/mssql/mssql_utility.php
@@ -41,7 +41,7 @@ class CI_DB_mssql_utility extends CI_DB_utility {
*/
public function _list_databases()
{
- return "EXEC sp_helpdb"; // Can also be: EXEC sp_databases
+ return 'EXEC sp_helpdb'; // Can also be: EXEC sp_databases
}
// --------------------------------------------------------------------
@@ -52,11 +52,12 @@ class CI_DB_mssql_utility extends CI_DB_utility {
* Generates a platform-specific query so that a table can be optimized
*
* @param string the table name
- * @return bool
+ * @return string
*/
public function _optimize_table($table)
{
- return FALSE; // Is this supported in MS SQL?
+ // Only supported in MSSQL 2005 and newer
+ return 'ALTER INDEX all ON '.$this->db->protect_identifiers($table).' REORGANIZE';
}
// --------------------------------------------------------------------
@@ -71,7 +72,8 @@ class CI_DB_mssql_utility extends CI_DB_utility {
*/
public function _repair_table($table)
{
- return FALSE; // Is this supported in MS SQL?
+ // Not supported in MSSQL
+ return FALSE;
}
// --------------------------------------------------------------------
@@ -80,7 +82,7 @@ class CI_DB_mssql_utility extends CI_DB_utility {
* MSSQL Export
*
* @param array Preferences
- * @return mixed
+ * @return bool
*/
public function _backup($params = array())
{