The odbc_result() function is used to read fields from a record. This function takes two parameters: the ODBC result identifier and a field number or name.
The code line below returns the value of the first field from the record:
$compname=odbc_result($rs,1); |
The code line below returns the value of a field called "CompanyName":
$compname=odbc_result($rs,"CompanyName"); |