Created
August 14, 2013 22:01
-
-
Save caseydentinger/6236103 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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