Project

General

Profile

Revision 1451

Added by Jing Tao over 18 years ago

Fixed a bug that the column in sql is ambiguous.

View differences:

src/edu/ucsb/nceas/metacat/QuerySpecification.java
734 734
    StringBuffer sql = new StringBuffer();
735 735
    String allowString = constructAllowString();
736 736
    String denyString = constructDenyString();
737
    sql.append("SELECT startnodeid, endnodeid from xml_access ");
737
    sql.append("SELECT distinct startnodeid, endnodeid from xml_access ");
738 738
    sql.append("WHERE docid in (");
739 739
    sql.append(doclist);
740 740
    sql.append(") AND subtreeid IS NOT NULL AND ");
......
804 804
      long startNodeId = startNodeIdObject.longValue();
805 805
      long endNodeId   = endNodeIdObject.longValue();
806 806
      // add into query
807
      self.append(" AND( nodeid < ");
807
      self.append(" AND( xml_nodes.nodeid < ");
808 808
      self.append(startNodeId);
809
      self.append(" OR nodeid > ");
809
      self.append(" OR xml_nodes.nodeid > ");
810 810
      self.append(endNodeId);
811 811
      self.append(")");
812 812
    }

Also available in: Unified diff