Upravte proměnné pro vaši implementaci, ale to by mělo procházet tabulkou.
<?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);
}
?>