query("SELECT * FROM shift_pump_vw WHERE date='$date'"); print_r(" Pump Number Fuel Grade Pump Opening Volume Pump Closing Volume Sale Volume (Closing Volume - Opening Volume) Unit Price Money (Sale Volume x Unit Price) "); while ($row = $shiftPumpReport1->fetchArray()) { //print_r($row); if ($row['number']==$shiftnum) { $openVolume = $row['open_volume']; $closeVolume = $row['close_volume']; $saleTotal =$closeVolume-$openVolume; $price= $row['price']; $moneyTotal = $saleTotal*$price; print_r( "" ."".$row['fp_id']."" ."".$row['grade_name']."" ."".decimalAndNumberFormat1($row['open_volume'])."" ."".decimalAndNumberFormat1($row['close_volume'])."" ."".decimalAndNumberFormat1($saleTotal)."" ."".decimalAndNumberFormat1($row['price'])."" ."".decimalAndNumberFormat1($moneyTotal)."" ."" ); } } ?>