Executes an SQL statement and copies the values from the first row in the result set to the specified script variables. The
OdbcGetNext function is then used to retrieve the remaining parts of the result set.
The value of the first data source column of the result set will be copied to the first variable in the list of variables. The second column will be copied to the second variable, and so on.
In this example, the data source, my_identifier contains the
CUSTOMER table. The
$cnr variable should contain the customer ID, which is the key in the
CUSTOMER table.
The SQL statement is constructed using the $cnr variable, and
OdbcGetFirst is called to retrieve the first row of the
CUSTNAME column from the data source.