SELECT
f_workorders_shipments.date,
f_inventory.id AS item_id,
f_workorders_shipments.inventory_code AS code,
f_inventory`.status,
f_inventory.type,
f_workorders.id AS order_id
FROM f_workorders
LEFT JOIN f_workorders_shipments
ON f_workorders.id = f_workorders_shipments.order_id
LEFT JOIN `f_inventory`
ON f_workorders_shipments.inventory_code = f_inventory.code
WHERE contact_id = "'.$_POST['id'].'"
AND inventory_code IS NOT NULL
ORDER BY due DESC'
質問する
39 次