[eluser]umefarooq[/eluser]
hi, i was generating csv file from MS sql server with odbc and getting this warning
Code:
A PHP Error was encountered
Severity: Warning
Message: odbc_field_name() [function.odbc-field-name]: Field numbering starts at 1
Filename: odbc/odbc_result.php
Line Number: 68
i modified code little bit in odbc_result
Code:
function list_fields()
{
$field_names = array();
//change from
// for ($i = 0; $i < $this->num_fields(); $i++)
//this
for ($i = 1; $i <= $this->num_fields(); $i++)
{
$field_names[] = odbc_field_name($this->result_id, $i);
}
return $field_names;
}
worked fine but looking for better solution or this bug need to be fixed