EllisLab/CodeIgniter — Issue #785: errors in $query->field_data()
Author: tobz-nz
Created: 2011-12-14 21:38:55+00:00
State: open

CI_DB_mysql_result->field_data() causes a number of errors when used on a query result:

$query = $this->db->query('selec....');
print_r($query->field_data());

but it works fine when used to get all fields in a table:

print_r($this->db->field_data($table_name));

In preg_match('/([a-zA-Z]+)(\(\d+\))?/', $field->Type, $matches); $field->Type is not defined, so things start falling apart from there onwards.