Project

General

Profile

« Previous | Next » 

Revision 28

Added by Matt Jones about 24 years ago

Finished modifications to DBSimpleQuery.java to allow simple, free text searching on element and attribute content

View differences:

DBSimpleQuery.java
34 34
     } else {
35 35
        try {
36 36
                    
37
          String query    = args[1];
37
          String query    = args[0];
38 38
          String user     = args[1];
39 39
          String password = args[2];
40 40
          String dbstring = null;
......
59 59
            nodeid = ((Long)rootlist.nextElement()).longValue();
60 60
            result.append("  <nodeid>").append(nodeid).append("</nodeid>\n");
61 61
          }
62
          result.append("</resultset>\n");
62
          result.append("</resultset>");
63 63

  
64 64
          System.out.println(result);
65 65

  
......
104 104
      try {
105 105
        pstmt =
106 106
          conn.prepareStatement("SELECT nodeid " +
107
                  "FROM xml_nodes WHERE nodedata LIKE 'Value1'");
108
                  //"FROM xml_nodes WHERE nodedata LIKE ?");
107
                  "FROM xml_nodes WHERE nodedata LIKE ?");
109 108
        // Bind the values to the query
110
        //pstmt.setString(1, query);
109
        pstmt.setString(1, query);
111 110

  
112 111
        pstmt.execute();
113 112
        try {

Also available in: Unified diff