Revision 6598
Added by ben leinfelder over 12 years ago
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
correctly set the prepared statement parameters for start and end date