I need a web page to display items that are active and that have been dispatched less than 2 hours ago, I can't figure out the less than 2 hours ago part
I've tried to set a date variable that is 2 hours behind the current time and comparing the time dispatched to the that variable
$DateVar = date('Y-m-d h:i', strtotime('-2 hours'));
$sql="SELECT Id, TransactionId, WONumber, DispatchText, SentBy, Vendor, Dispatched,
Acknowledged, TimeDispatched, Time
FROM `DumpsterDispatch`
WHERE (Dispatched IS NULL
OR Acknowledged = 'N'
OR TimeDispatched >= \"$DateVar\")
AND Id > 1490
ORDER BY Id DESC LIMIT 100";
I expect the web page to display all active orders and any order resolved within the past 2 hours, however with this code it displays all of the resolved orders from the given day