Index: openacs-4/packages/ecommerce/www/index-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/index-oracle.xql,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/ecommerce/www/index-oracle.xql 13 Jan 2005 13:57:59 -0000 1.5
+++ openacs-4/packages/ecommerce/www/index-oracle.xql 11 Aug 2008 07:02:30 -0000 1.6
@@ -23,15 +23,34 @@
+
+
+ select count(*) as product_count
+ from ec_products_searchable p, ec_user_session_offer_codes o
+ where (p.product_id(+)=o.product_id and user_session_id = :user_session_id)
+ and not exists (select 1
+ from ec_category_product_map m
+ where p.product_id = m.product_id)
+
+
+
+ select r.*
+ from (
+ select rownum as r_rownum, q.*
+ from (
select p.product_id, p.product_name, p.one_line_description, o.offer_code
from ec_products_searchable p, ec_user_session_offer_codes o
where (p.product_id(+)=o.product_id and user_session_id = :user_session_id)
and not exists (select 1
from ec_category_product_map m
where p.product_id = m.product_id)
order by p.product_name
+ ) q
+ ) r
+ where r_rownum > :start_row
+ and r_rownum <= :start_row + :how_many