Tweek variablerna för din implementering men detta bör iterera genom tabellen.
<?PHP
$db_handle = mysql_connect($server, $user_name, $password);
$db_found = mysql_select_db($database, $db_handle);
if ($db_found) {
$SQL = "SELECT dte FROM tb_name";
$result = mysql_query($SQL);
while ($db_field = mysql_fetch_assoc($result)) {
print date_diff($db_field['dte'], $datetime2) . "<BR>";
$datetime2=$db_field['dte'];
}
mysql_close($db_handle);
}
else {
print "Database NOT Found ";
mysql_close($db_handle);
}
?>