select user_id from ec_orders where order_id = :order_id insert into ec_creditcards (creditcard_id, user_id, creditcard_number, creditcard_last_four, creditcard_type, creditcard_expire, billing_address) values (:creditcard_id, :user_id, :creditcard_number, :creditcard_last_four, :creditcard_type, :creditcard_expire, :address_id) update ec_orders set creditcard_id = :creditcard_id where order_id = :order_id