Index: openacs-4/packages/ecommerce/www/admin/orders/search-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/orders/search-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/ecommerce/www/admin/orders/search-postgresql.xql 23 Jul 2001 06:38:24 -0000 1.1 +++ openacs-4/packages/ecommerce/www/admin/orders/search-postgresql.xql 29 Jan 2002 00:11:46 -0000 1.2 @@ -24,6 +24,30 @@ + + + + select o.order_id, o.confirmed_date, o.order_state, + ec_total_price(o.order_id) as price_to_display, + o.user_id, + u.first_names, u.last_name, + p.product_name, + count(*) as n_items + from ec_orders o + JOIN ec_items i on (o.order_id=i.order_id) + JOIN ec_products p on (i.product_id=p.product_id) + LEFT JOIN cc_users u on (o.user_id=u.user_id) + where upper(p.sku) like upper(:product_sku_query_string) + group by o.order_id, o.confirmed_date, o.order_state, + ec_total_price(o.order_id), + o.user_id, + u.first_names, u.last_name, p.product_name + order by order_id + + + + +