Index: openacs-4/contrib/packages/classified-ads/tcl/categories-procs-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/classified-ads/tcl/categories-procs-postgresql.xql,v
diff -u -N -r1.3 -r1.4
--- openacs-4/contrib/packages/classified-ads/tcl/categories-procs-postgresql.xql 30 Jul 2003 04:56:41 -0000 1.3
+++ openacs-4/contrib/packages/classified-ads/tcl/categories-procs-postgresql.xql 31 Jul 2003 09:31:00 -0000 1.4
@@ -110,7 +110,7 @@
subtree.keyword_id
from cr_keywords parent, cr_keywords subtree
where parent.keyword_id = :keyword_id
- and parent.tree_sortkey between subtree.tree_sortkey and tree_right(subtree.tree_sortkey)
+ and subtree.tree_sortkey between parent.tree_sortkey and tree_right(parent.tree_sortkey)
) keywords
WHERE
att.attribute_id = ca.attribute_id
@@ -120,6 +120,29 @@
+
+
+
+ SELECT
+ attribute_name, datatype
+ FROM
+ acs_attributes att,
+ ca_attributes ca,
+ (
+ select
+ subtree.keyword_id
+ from cr_keywords parent, cr_keywords subtree
+ where parent.keyword_id = :keyword_id
+ and subtree.tree_sortkey between parent.tree_sortkey and tree_right(parent.tree_sortkey)
+ ) keywords
+ WHERE
+ att.attribute_id = ca.attribute_id
+ AND
+ ca.keyword_id = keywords.keyword_id
+
+
+
+
@@ -131,7 +154,7 @@
where
parent.keyword_id = :keyword_id
and
- parent.tree_sortkey between subtree.tree_sortkey and tree_right(subtree.tree_sortkey)
+ subtree.tree_sortkey between parent.tree_sortkey and tree_right(parent.tree_sortkey)