Ver original$query = "SELECT camposFROM tablaWHERE fecha < '".date('Y-m-d H:i')."'ORDER BY fecha DESCLIMIT 1";