- if (querystring == null)
- {
- querystring = new StringBuffer(query);
- nq++;
- }
- else
- {
- querystring.append("," + query);
- nq++;
- }
- }
- if (db == null)
- {
- System.err.println("Invalid Query string : '" + ids
- + "'\nShould be of form 'dbname:q1;q2;q3;q4'");
- return null;
- }
- String[] rslt = fetchBatch(querystring.toString(), db, f, s, outFile);
- if (rslt != null)
- {
- String[] nrslts = new String[rslt.length + rslts.length];
- System.arraycopy(rslts, 0, nrslts, 0, rslts.length);
- System.arraycopy(rslt, 0, nrslts, rslts.length, rslt.length);
- rslts = nrslts;
+ queryString.append(appending ? "," : "");
+ queryString.append(query);
+ appending = true;