I thought of that, but it is actually possible for our operators to add additinal orders to routes after other orders have been marked as SD. We also use the times that are saved for future reference and also the drop sequences.
I need it to save all the information, but if the OrderStatus = 'SD' do not change that field only.
Main Topics
Browse All Topics





by: MunterManPosted on 2009-03-12 at 06:22:31ID: 23867901
Put the exclusion
AND OrderStatus <> 'SD'
This will stop the query running when OrderStatus is not SD
$sql = sprintf("UPDATE GlobalOrders SET OrderRunID=%d, OrderStatus='AR', " .
"OrderActionDate='%s', OrderRunDropNo=%d, OrderEstArrival='%s', " .
"OrderEstDepart='%s' WHERE OrderSubby <> '442 Logistics' AND OrderID=%d AND OrderStatus <> 'SD' ",
$arrDrops[$i]->orderrunid, $rundate,
$arrDrops[$i]->ordernum,
$orderestarrival,
$orderestdepart,
$arrDrops[$i]->orderid