Thank you nemonoman.
I've looked at the Unified ODBC functions and while the documentation says there is a corresponding odbc function to mysql_fetch_array, the user notes reveal that this function (as well as odbc_fetch_object) are turned off in the source code as well as the builds by default. The user notes also have several homebrewn functions to replace odbc_fetch_array, but I haven't been able to get them to work properly.
function odbc_fetch_array($result, $rownumber=-1) {
if (PHP_VERSION > "4.1") {
if ($rownumber < 0) {
odbc_fetch_into($result, &$rs);
} else {
odbc_fetch_into($result, &$rs, $rownumber);
}
} else {
odbc_fetch_into($result, $rownumber, &$rs);
}
foreach ($rs as $key => $value) {
$rs_assoc[odbc_field_name($result, $key+1)] = $value;
}
return $rs_assoc;
}
function odbc_fetch_resultset($resID)
{
/* Return all the rows returned by a query in an array.
*/
$resultSet=array();
// Assign the field names to $resultSet['fieldNames']
$fCount = odbc_num_fields($resID);
for ($i=1; $i<= $fCount; $i++){
$fNames[$i] = odbc_field_name($resID, $i);
}
$resultSet['fieldNames']=$fNames;
// Assign the records
for ($i=1; odbc_fetch_row($resID,$i); $i++){
$record=array();
for ($j = 1; $j <= $fCount; $j++){
$fName = odbc_field_name($resID, $j);
$record[$fName]=odbc_result($resID, $j);
}
$resultSet[$i]=$record;
}
return ($resultSet);
}
Above are two of the functions, copied from http://www.php.net/manual/en/function.odbc-fetch-array.php
How would I be able to construct a working function, or make use of one of the two above functions to achieve the proper results?