Skip to content

Instantly share code, notes, and snippets.

@caseydentinger
Created August 14, 2013 22:01
Show Gist options
  • Save caseydentinger/6236103 to your computer and use it in GitHub Desktop.
Save caseydentinger/6236103 to your computer and use it in GitHub Desktop.
$params = ['status' => $this->req()->status,
'value' => $this->req()->value,
'unit' => $this->req()->unit];
\SparkLib\Fail::log($params);
$query = "select o.*, sm.name as shipping from orders o
join orders_status_history osh on osh.orders_status_history_id = ({$join_sub})
join shipping_methods sm on o.shipping_method = sm.shipping_methods_id
join payment_methods pm on o.payment_methods_id = pm.payment_methods_id
where o.orders_status = :status
and o.shipping_method != 18
{$shipping_clause}
{$can_ship_clause}
and osh.date_added < now() - interval :value :unit
group by orders_id
order by orders_id desc";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment