Created
January 24, 2013 17:41
-
-
Save caseydentinger/4625583 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
select op.orders_id as picked | |
from orders_products op | |
join products_stock_adjustments psa on | |
op.orders_id = psa.orders_id and | |
op.products_id = psa.products_id and | |
op.products_quantity = psa.adjustment_amount_physical * -1 | |
where op.orders_id = {$this->id()} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'd probably be more explict. Like: