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_list ", "]) 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_list ", "]) 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_list ", "]) select transaction_amount from ec_financial_transactions where order_id = :order_id and to_be_captured_p is null and transaction_type = 'charge' select transaction_id from ec_financial_transactions where order_id=:order_id and to_be_captured_p is null and transaction_type = 'charge' update ec_financial_transactions set failed_p='t' where transaction_id=:transaction_id