summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/mssql
diff options
context:
space:
mode:
authoradmin <devnull@localhost>2006-09-25 05:44:04 +0200
committeradmin <devnull@localhost>2006-09-25 05:44:04 +0200
commit72496373008b263e098cf6082cdce1d47d01d3f1 (patch)
tree887849565e73eaef2ffa95b3c722ed15f3e508bc /system/database/drivers/mssql
parent6ca6f9471ba31f7cba9054d075b4f90382b2d410 (diff)
Diffstat (limited to 'system/database/drivers/mssql')
-rw-r--r--system/database/drivers/mssql/mssql_utility.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/system/database/drivers/mssql/mssql_utility.php b/system/database/drivers/mssql/mssql_utility.php
index 9ff92d41b..bc398e7f7 100644
--- a/system/database/drivers/mssql/mssql_utility.php
+++ b/system/database/drivers/mssql/mssql_utility.php
@@ -52,6 +52,29 @@ class CI_DB_mssql_utility extends CI_DB_utility {
}
// --------------------------------------------------------------------
+
+ /**
+ * List databases
+ *
+ * @access public
+ * @return bool
+ */
+ function list_databases()
+ {
+ $query = $this->db->query("EXEC sp_helpdb"); // Can also be: EXEC sp_databases
+ $dbs = array();
+ if ($query->num_rows() > 0)
+ {
+ foreach ($query->result_array() as $row)
+ {
+ $dbs[] = current($row);
+ }
+ }
+
+ return $dbs;
+ }
+
+ // --------------------------------------------------------------------
/**
* Version number query string