Model | \n"; echo "No Popout | \n"; echo "Popout | \n"; echo "Total | \n"; $currModel = ""; $currYear = ""; $lastModel = ""; $lastYear = ""; $started = 0; $ttlOverall = 0; $ttlPopout = 0; $ttlNoPopout = 0; while ($row = mysql_fetch_array($result)) { $currYear = $row["model_year"]; $currModel = $row["model_name"]; if (($lastYear != $currYear)||($lastModel != $currModel)) { if (($started)&&($havePopout > 0)) { echo "
---|---|---|---|
$lastYear $lastModel | \n"; echo "$noPopout | \n"; echo "$havePopout | \n"; $ttl = (int) $noPopout + (int) $havePopout; echo "$ttl | \n"; echo "
$lastYear $lastModel | \n"; echo "$noPopout | \n"; echo "$havePopout | \n"; $ttl = (int) $noPopout + (int) $havePopout; echo "$ttl | \n"; echo "
\n"; echo " | $ttlNoPopout | \n"; echo "$ttlPopout | \n"; echo "$ttlOverall | \n"; echo "
Name | \n"; echo "Model | \n"; echo "Mileage | \n"; echo "Has It | \n"; echo "Started | \n"; echo "Fixed | \n"; echo "KP | \n"; echo "WR | \n"; echo "OW | \n"; $ttlAnswers = 0; $ttlHasIt = 0; $ttlFixed = 0; $ttlKP = 0; $ttlWR = 0; $ttlOW = 0; while ($row = mysql_fetch_array($result)) { echo "
---|---|---|---|---|---|---|---|---|
", $row["first_name"], " ", $row["last_name"], " | \n"; echo "", $row["model_year"], " ", $row["model_name"], " | \n"; echo "", $row["v_mileage"], " | \n"; echo "", $row["haspopout"], " | \n"; if ($row["haspopout"] == "Y") { echo "", $row["p_mileage"], " | \n"; echo "", $row["fixed"], " | \n"; echo "", $row["kept_parts"], " | \n"; echo "", $row["warranted"], " | \n"; echo "", $row["out_of_warranty"], " | \n"; } $ttlAnswers++; if ($row["haspopout"] == "Y") $ttlHasIt++; if ($row["fixed"] == "Y") $ttlFixed++; if ($row["kept_parts"] == "Y") $ttlKP++; if ($row["warranted"] == "Y") $ttlWR++; if ($row["out_of_warranty"] == "Y") $ttlOW++; echo "$ttlAnswers | \n"; echo "\n"; echo " | \n"; echo " | $ttlHasIt | \n"; echo "\n"; echo " | $ttlFixed | \n"; echo "$ttlKP | \n"; echo "$ttlWR | \n"; echo "$ttlOW | \n"; echo "