Project

General

Profile

« Previous | Next » 

Revision 6598

correctly set the prepared statement parameters for start and end date

View differences:

src/edu/ucsb/nceas/metacat/EventLog.java
256 256
            for (String val: paramValues) {
257 257
            	stmt.setString(parameterIndex, val);
258 258
            }
259
            if (startIndex > 0) {
260
                stmt.setTimestamp(parameterIndex + startIndex, startDate); 
259
            if (startDate != null) {
260
                stmt.setTimestamp(parameterIndex++, startDate); 
261 261
            }
262
            if (endIndex > 0) {
263
                stmt.setTimestamp(parameterIndex + endIndex, endDate);
262
            if (endDate != null) {
263
            	stmt.setTimestamp(parameterIndex++, endDate);
264 264
            }
265 265
            stmt.execute();
266 266
            ResultSet rs = stmt.getResultSet();

Also available in: Unified diff