diff options
author | admin <devnull@localhost> | 2006-09-26 00:12:32 +0200 |
---|---|---|
committer | admin <devnull@localhost> | 2006-09-26 00:12:32 +0200 |
commit | ab4f61bacfa022c0c7238e9661ad9cb2ac440d95 (patch) | |
tree | d0374898fd8e6452b36728fa75030e4ab72ea35e /system/database/drivers/mysql/mysql_result.php | |
parent | e106318c19938c621198924ab5d292592dbb4477 (diff) |
Diffstat (limited to 'system/database/drivers/mysql/mysql_result.php')
-rw-r--r-- | system/database/drivers/mysql/mysql_result.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/system/database/drivers/mysql/mysql_result.php b/system/database/drivers/mysql/mysql_result.php index e540489bb..91c4af12c 100644 --- a/system/database/drivers/mysql/mysql_result.php +++ b/system/database/drivers/mysql/mysql_result.php @@ -53,6 +53,27 @@ class CI_DB_mysql_result extends CI_DB_result { // -------------------------------------------------------------------- /** + * Fetch Field Names + * + * Generates an array of column names + * + * @access public + * @return array + */ + function field_names() + { + $field_names = array(); + while ($field = mysql_fetch_field($this->result_id)) + { + $field_names[] = $field->name; + } + + return $field_names; + } + + // -------------------------------------------------------------------- + + /** * Field data * * Generates an array of objects containing field meta-data |