When using odbc_result inside of a while loop, for some reason, data is not returned.
Example:
while(odbc_fetch_into($rs,&$fields))
{
$ID = odbc_result($rs,"ID");
$artist_group = odbc_result($rs,"artist_group");
print "$artist_group";
}
I get nothing. But if I do the same thing and reference the record set using the "fields" array, the data is returned.
Example:
while(odbc_fetch_into($rs,&$fields))
{
$ID = $fields[0];
$artist_group = $fields[1]
print "$artist_group";
}
This gives me what I need, but thus results in me having to reference the data by number and not name.
Does anyone have an explanation for such a strange problem and possibly a solution so that I can reference table data by column name and not number?