Index: openacs-4/packages/ecommerce/www/admin/products/list.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/products/list.tcl,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/ecommerce/www/admin/products/list.tcl 10 Sep 2002 22:22:45 -0000 1.2 +++ openacs-4/packages/ecommerce/www/admin/products/list.tcl 1 Nov 2003 11:22:22 -0000 1.3 @@ -22,7 +22,7 @@ set category_name [db_string category_name_select "select category_name from ec_categories where category_id = :category_id"] set title "$category_name Products" set menubar_stub "list.tcl?category_id=$category_id&" - set category_exclusion_clause "\nand exists (select 1 from ec_category_product_map map where map.product_id = ep.product_id and map.category_id = :category_id)" + set category_exclusion_clause "where exists (select 1 from ec_category_product_map map where map.product_id = ep.product_id and map.category_id = :category_id)" } if { ![info exists order_by] || [empty_string_p $order_by] || $order_by == "name"} { @@ -55,12 +55,7 @@ set list_items "" -db_foreach product_select "select ep.product_id, ep.product_name, ep.available_date, count(distinct eir.item_id) as n_items_ordered, count(distinct epc.comment_id) as n_comments -from ec_products ep, ec_items_reportable eir, ec_product_comments epc -where ep.product_id = eir.product_id(+) -and ep.product_id = epc.product_id(+) $category_exclusion_clause -group by ep.product_id, ep.product_name, ep.available_date -$order_by_clause" { +db_foreach product_select " *SQL* " { append list_items "
  • $product_name (available since [util_AnsiDatetoPrettyDate $available_date]; $n_items_ordered sold" if { $n_comments > 0 } {