test fix driver issues

This commit is contained in:
Devin Smith 2015-01-22 20:58:55 -08:00
parent b7f8a4b4e3
commit 9bae2414d1

View File

@ -0,0 +1,18 @@
<?php
$q = '
select `order`.* from `order`
left join restaurant using (id_restaurant)
left join admin_notification_log using (id_order)
where restaurant.delivery_service=1 and restaurant.active=1 and admin_notification_log.id_admin_notification_log is null
and `order`.date > date_sub(now(), interval 10 minute)
order by `order`.id_order desc
';
$orders = Order::q($q);
foreach ($orders as $order) {
echo $order->id_order."\n";
$order->notifyDrivers();
}
echo 'done';