Mileage Database Notice
#1
Suddenly it struck me that there are actually more than 2,478,935 miles worth of data in the Real Hybrid Mileage Database (as of 11/15/04 @ 11PM EST). Currently, this number is obtained by adding the total distance variable for each car and totaling. However, when I added this statistic, I apparently forgot there are also tanks in the database that aren't contributing to a vehicle's total because of both an odometer override and additional tanks. For this reason, there very well may be a few hundred thousand more miles in the database than I thought. I'll try and update the code to reflect this ASAP.
#2
Odd. I made a change that should have fixed the code, but it actually came up with LESS miles! Hmmm. Who knows PHP?
OLD
NEW
OLD
Code:
$getmiles = mysql_query("SELECT SUM(sumdistance) AS total FROM car"); $miles = mysql_fetch_array($getmiles);
Code:
$getmiles = mysql_query("SELECT SUM(sumdistance) AS total FROM car WHERE lmpgoverride != 0"); $carmiles = mysql_fetch_array($getmiles); $getmoremiles = mysql_query("SELECT SUM(distance) AS total FROM data"); $datamiles = mysql_fetch_array($getmoremiles); $miles = $carmiles['total'] + $datamiles['total'];
Thread
Topic Starter
Forum
Replies
Last Post
2008 Honda CIvic Hybrid
HCH II-Specific Discussions
8
03-05-2008 03:13 PM
jmg14213
Honda Civic Hybrid
12
12-08-2005 01:19 PM
bookwitch
Toyota Prius
8
10-20-2005 09:30 AM