Du kan gøre dette ved at bruge PHP:
$query = mysqli_query("SELECT time, lat, `long` FROM Points ORDER BY time");
// output header row
echo str_pad('time', 8) .'|';
echo str_pad('lat', 7) .'|';
echo "long\n";
$prevLat = $prevLong = '';
while ($row = mysqli_fetch_assoc($query)) {
if ($row['lat'] === $prevLat && $row['long'] === $prevLong) {
// if this row's lat and long values are the same as the
// previous row's values, skip this row.
continue;
}
$prevLat = $row['lat'];
$prevLong = $row['long'];
echo str_pad($row['time'], 8) .'|';
echo str_pad($row['lat'], 7) .'|';
echo "{$row['long']}\n";
}
Her er et eksempel:http://codepad.org/c0SjA058