Hi,
I'm trying to compare to dates/times. If one date is greater then the other, then it should do something. However it's not working.
I have
No matter what the dates entered are, the status is always set to closed. As an example, I echo'd out the times I was comparingPHP Code:<?php
//Check the close date of each job
if ($current_date >= $closed_date) {
$status = "Closed";
// Change the status in the DB to closed
$sql = "UPDATE jobs SET status = 0 where id = '$job_id'";
$result = @mysql_query($sql,$db) or die(mysql_error());
} else {
$status = "Open";
}
?>
closed: 22 03 2003 : 17:00 PM
current: 22 03 2003 : 14:18 PM
obviously, 14:18pm is not greater then 17:00pm , so why isn't it working?
![]()





Bookmarks