How do you extract out the result row of the SQL Server COMPUTE clause?
$query = "SELECT DISTINCT f.coil_weight, l.coilname
FROM finalinspect AS f
JOIN lgrExitCoils l ON l.cid = f.cid
WHERE l.timestamp BETWEEN $daterange
COMPUTE SUM(f.coil_weight)";
$result = odbc_exec( $connect_id, $query );
odbc_fetch_into( $result, $row );
$shift_tonnage = round($row[0], 1); <----- How do I get the result of the COMPUTE into the variable?
Any ideas?
thanks,