fixed check for a method named 'field_names' which doesn't exist to 'list_fields' which is the correct method.
http://codeigniter.com/bug_tracker/bug/5787/
diff --git a/system/database/DB_utility.php b/system/database/DB_utility.php
index 195e4c4..6619e80 100644
--- a/system/database/DB_utility.php
+++ b/system/database/DB_utility.php
@@ -175,7 +175,7 @@
*/
function csv_from_result($query, $delim = ",", $newline = "\n", $enclosure = '"')
{
- if ( ! is_object($query) OR ! method_exists($query, 'field_names'))
+ if ( ! is_object($query) OR ! method_exists($query, 'list_fields'))
{
show_error('You must submit a valid result object');
}