Good day,
i have problem to display a field from databse and calculate time different.
See below my code.
I hope somebody can fix the problem for me.
<?php
$db = mysql_connect(" localhost", "****", "********") ;
mysql_select_db ("FDP",$db);
if (isset($_POST['clearance']))
{
$result = mysql_query("SE LECT cs, tac, eta, eat, fl, du FROM aeroarrival WHERE DATE = current_date and TIMEDIFF( eta, current_time ) <= '00:30:00' as tmdif
ORDER BY ETA",$db);
$myrow = mysql_fetch_arr ay($result)
echo ($row['CS']);
echo ($row['tmdif']);
$CTIME1 = DATE('H : i : s');
$CTIME = $CTIME1 - $EAT;
//echo 'cs';
if ($CTIME < '00:15:00')
echo "DontClear! ";
elseif ($CTIME < '00:20:00')
echo "SemiClear! ";
else if ($CTIME > '00:20:00')
echo "Clear!";
else {
echo "GoodClear! ";
}
}
?>
i have problem to display a field from databse and calculate time different.
See below my code.
I hope somebody can fix the problem for me.
<?php
$db = mysql_connect(" localhost", "****", "********") ;
mysql_select_db ("FDP",$db);
if (isset($_POST['clearance']))
{
$result = mysql_query("SE LECT cs, tac, eta, eat, fl, du FROM aeroarrival WHERE DATE = current_date and TIMEDIFF( eta, current_time ) <= '00:30:00' as tmdif
ORDER BY ETA",$db);
$myrow = mysql_fetch_arr ay($result)
echo ($row['CS']);
echo ($row['tmdif']);
$CTIME1 = DATE('H : i : s');
$CTIME = $CTIME1 - $EAT;
//echo 'cs';
if ($CTIME < '00:15:00')
echo "DontClear! ";
elseif ($CTIME < '00:20:00')
echo "SemiClear! ";
else if ($CTIME > '00:20:00')
echo "Clear!";
else {
echo "GoodClear! ";
}
}
?>
Comment