Skip to content

Commit 2d105b6

Browse files
authored
Merge pull request #165 from LabKey/fb_sqlAppendValue
Switch SQLFragment to use appendValue
2 parents 13090ff + 6aea44f commit 2d105b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

LDK/src/org/labkey/ldk/notification/SiteSummaryNotification.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ private void dataEntryStatus(Container c, User u, final StringBuilder msg)
288288
Calendar cal = Calendar.getInstance();
289289
cal.setTime(new Date());
290290
cal.add(Calendar.DATE, -1);
291-
SQLFragment sql = new SQLFragment("SELECT t.formtype, count(*) as total FROM ehr.tasks t WHERE cast(t.created as date) = '" + new SimpleDateFormat("yyyy-MM-dd").format(cal.getTime()) + "' GROUP BY t.formtype ORDER BY t.formtype");
291+
SQLFragment sql = new SQLFragment("SELECT t.formtype, count(*) as total FROM ehr.tasks t WHERE cast(t.created as date) = ").appendValue(new SimpleDateFormat("yyyy-MM-dd").format(cal.getTime())).append(" GROUP BY t.formtype ORDER BY t.formtype");
292292

293293
UserSchema us = QueryService.get().getUserSchema(u, c, "core");
294294
SqlSelector ss = new SqlSelector(us.getDbSchema(), sql);

0 commit comments

Comments
 (0)