Selaa lähdekoodia

bugfix in SQL query logic for date ranges

remove redundant/nested `string-append`
George C. Privon 2 vuotta sitten
vanhempi
commit
a26df30edf
1 muutettua tiedostoa jossa 3 lisäystä ja 2 poistoa
  1. 3 2
      update_proposals.rkt

+ 3 - 2
update_proposals.rkt

@@ -133,7 +133,7 @@
                          "status!='submitted'")
                      ; find things that are "accepted" or "funded"
                      (if isaccept
-                         " AND status LIKE '%Accepted%' OR status LIKE '%Funded%'"
+                         " AND (status LIKE '%Accepted%' OR status LIKE '%Funded%')"
                          "")
                      ; find things that are "rejected"
                      (if isrej
@@ -164,7 +164,8 @@
                            "') ")
                          "")))
   (define props (query-rows conn (string-append "SELECT ID,telescope,solicitation,title,PI,status FROM proposals WHERE "
-                                                (string-append selclause dateclause)))
+                                                selclause
+                                                dateclause)))
   (display (string-append (number->string (length props))))
   (if issub
       (displayln " pending proposals found.")