I'm having a strange problem. Are you not allowed to call a function and return a value inside of a while loop for odbc_fetch_array?
The reason is that I'm getting an error "Warning: odbc_fetch_array(): 23 is not a valid ODBC result resource in [this-file pointing at the while]" when I execute the code below. But if comment out $crew = getCrewByDate(arg) etc the code executes with no errors. The query is fine and all my functions are included and working fine.
Any ideas?
while( $row = odbc_fetch_array($result) )
{
$weight = $row['Coil_Weight'];
$timestamp = $row['timeStamp'];
$crew = getCrewByDate( $timestamp );
print "<TR bgcolor=$bgcolor>";
print "<td align=center>" .substr($timestamp, 0, 19) . "</td>";
print "<td align=center>".$width."</td>
print "<td align=center>".$crew."</td>";
print "</tr>
}