$sql = 'DELETE O, G
FROM ' . $GLOBALS['ecs']->table('delivery_order') . ' AS O, ' . $GLOBALS['ecs']->table('delivery_goods') . ' AS G
WHERE O.order_id = \'' . $order_id . '\'
AND O.status =
AND O.delivery_id = G.delivery_id';
$query = $GLOBALS['db']->query($sql, 'SILENT'); if ($query)
{
$return_res = ;
} return $return_res;