From ab4f61bacfa022c0c7238e9661ad9cb2ac440d95 Mon Sep 17 00:00:00 2001 From: admin Date: Mon, 25 Sep 2006 22:12:32 +0000 Subject: --- system/database/drivers/odbc/odbc_result.php | 23 ++++++++++++++- system/database/drivers/odbc/odbc_utility.php | 41 +++++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 1 deletion(-) (limited to 'system/database/drivers/odbc') diff --git a/system/database/drivers/odbc/odbc_result.php b/system/database/drivers/odbc/odbc_result.php index 49e5e9012..385209c56 100644 --- a/system/database/drivers/odbc/odbc_result.php +++ b/system/database/drivers/odbc/odbc_result.php @@ -49,7 +49,28 @@ class CI_DB_odbc_result extends CI_DB_result { { return @odbc_num_fields($this->result_id); } - + + // -------------------------------------------------------------------- + + /** + * Fetch Field Names + * + * Generates an array of column names + * + * @access public + * @return array + */ + function field_names() + { + $field_names = array(); + for ($i = 0; $i < $this->num_fields(); $i++) + { + $field_names[] = odbc_field_name($this->result_id, $i); + } + + return $field_names; + } + // -------------------------------------------------------------------- /** diff --git a/system/database/drivers/odbc/odbc_utility.php b/system/database/drivers/odbc/odbc_utility.php index 5b4558f68..2932da874 100644 --- a/system/database/drivers/odbc/odbc_utility.php +++ b/system/database/drivers/odbc/odbc_utility.php @@ -159,6 +159,47 @@ class CI_DB_odbc_utility extends CI_DB_utility { return "SELECT TOP 1 FROM ".$this->db->_escape_table($table); } + // -------------------------------------------------------------------- + + /** + * Optimize table query + * + * Generates a platform-specific query so that a table can be optimized + * + * @access private + * @param string the table name + * @return object + */ + function _optimize_table($table) + { + // Not a supported ODBC feature + if ($this->db_debug) + { + return $this->display_error('db_unsuported_feature'); + } + return FALSE; + } + + // -------------------------------------------------------------------- + + /** + * Repair table query + * + * Generates a platform-specific query so that a table can be repaired + * + * @access private + * @param string the table name + * @return object + */ + function _repair_table($table) + { + // Not a supported ODBC feature + if ($this->db_debug) + { + return $this->display_error('db_unsuported_feature'); + } + return FALSE; + } } -- cgit v1.2.3-24-g4f1b