Bu bir DATETIME sütun "targetDate" 12 saatten daha eski olan masa "myTable" den "alan1" çeker.
$hardcodedHours = 12;
$sql = "SELECT field1 FROM myTable WHERE targetDate <= '" . date('Y-m-d H:i:s', strtotime("-$hardcodedHours hours")) . "'";
$result = mysql_query($sql);