Hi Krik,
I think your right, I need to ask the question again. Here goes.
I have a data table which has a field (type datetime) called "RollOffTime", the stored and output format looks like this: "2010-08-27 17:30:14".
I have a variable "$nTime" which holds the current date and time. The output format for this variable looks like this; "2010-08-27 20:45:17"
What I am tyring to do is run a sql query that will update all the records where the stored data "RollOffTime" is less than the current time.
Example: if the RollOffTime is less than the current time, update the record. The code I am using is as follows;
$nTime = date("Y-m-d H:i:s");
$query_nonactive = "UPDATE flightdata SET FIDSFlightDisplay = 'N' WHERE RollOffTime < " . $nTime ;