$hostpath = pathinfo($_SERVER["REQUEST_URI"]); $devip = $hostpath['basename']; $conn = mysql_connect('127.0.0.1', 'auto', 'auto') or die('Could not connect: ' . mysql_error()); mysql_select_db('automotive') or die('Could not select database'); # $query = "Select nas_info.org_unit_id, is_org_admin from user_auth, user_info, nas_info where user_auth.user_name='$cookiestring[0]' and user_auth.user_id=user_info.user_id and user_info.org_unit_id=nas_info.org_unit_id and nas_info.nas_ip='$devip'"; $query = "select fa_date, fa_vol, v_odo, full from fuel_add order by fa_date;"; $result = mysql_query($query) or die('Query failed: ' . mysql_error()); ?>
Date | Amount Added | Odo ReadingAdjusted Odo | Full? | Math? | MPG since full | |
$datetime | $fueladd | $realodo | $odo | $full | $miles / $fuelsum | $mileage |
$datetime | $fueladd | $realodo | $odo | $full | $miles / $fuelsum | ",round($mileage, 2)," |