select count(*) from ec_shipments where shipment_id=:shipment_id select shipping_method from ec_orders where order_id=:order_id select shipping_method from ec_orders where order_id=:order_id select coalesce(sum(price_charged),0) from ec_items where item_id in ([join $item_id_vars ", "]) select count(*) from ec_shipments where order_id=:order_id select coalesce(sum(shipping_charged),0) from ec_items where item_id in ([join $item_id_vars ", "]) select ${shipping_of_items}::numeric + shipping_charged from ec_orders where order_id=:order_id update ec_items set item_state='shipped', shipment_id=:shipment_id where item_id in ([join $item_id_vars ", "]) select count(*) from ec_financial_transactions where order_id=:order_id and to_be_captured_p='t' select max(transaction_id) from ec_financial_transactions where order_id=:order_id select max(transaction_id) from ec_financial_transactions where order_id=:order_id update ec_financial_transactions set failed_p='t' where transaction_id=:transaction_id