Index: openacs-4/packages/ecommerce/www/shopping-cart-add-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/shopping-cart-add-oracle.xql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/ecommerce/www/shopping-cart-add-oracle.xql 16 Feb 2002 23:32:06 -0000 1.3 +++ openacs-4/packages/ecommerce/www/shopping-cart-add-oracle.xql 26 May 2002 04:36:50 -0000 1.4 @@ -1,17 +1,23 @@ - oracle8.1.6 + + oracle + 8.1.6 + insert into ec_orders (order_id, user_session_id, order_state, in_basket_date) select :order_id, :user_session_id, 'in_basket', sysdate from dual - where not exists (select 1 from ec_orders where user_session_id=:user_session_id and order_state='in_basket') + where not exists (select 1 + from ec_orders + where user_session_id=:user_session_id + and order_state='in_basket') - + insert into ec_problems_log @@ -20,14 +26,22 @@ (ec_problem_id_sequence.nextval, sysdate,:errormsg) - + insert into ec_items - (item_id, product_id, color_choice, size_choice, style_choice, order_id, in_cart_date) - (select ec_item_id_sequence.nextval, :product_id, :color_choice, :size_choice, :style_choice, :order_id, sysdate from dual - where not exists (select 1 from ec_items where order_id=:order_id and product_id=:product_id and color_choice [ec_decode $color_choice "" "is null" "= :color_choice"] and size_choice [ec_decode $size_choice "" "is null" "= :size_choice"] and style_choice [ec_decode $style_choice "" "is null" "= :style_choice"] and ((sysdate() - in_cart_date) * 86400 < 5))) + (item_id, product_id, color_choice, size_choice, style_choice, order_id, in_cart_date) + (select ec_item_id_sequence.nextval, :product_id, :color_choice, :size_choice, :style_choice, :order_id, sysdate + from dual + where not exists (select 1 + from ec_items + where order_id=:order_id + and product_id=:product_id + and color_choice [ec_decode $color_choice "" "is null" "= :color_choice"] + and size_choice [ec_decode $size_choice "" "is null" "= :size_choice"] + and style_choice [ec_decode $style_choice "" "is null" "= :style_choice"] + and ((sysdate() - in_cart_date) * 86400 < 5))) - +