From dc1263bb56133a2e6d342a5d56ff906ee7ecd6cc Mon Sep 17 00:00:00 2001 From: Eilert Tunheim <emtunhei@stud.ntnu.no> Date: Mon, 4 Apr 2022 15:55:19 +0200 Subject: [PATCH] updated index from = to += --- src/main/java/com/application/DB/DB.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/application/DB/DB.java b/src/main/java/com/application/DB/DB.java index f56c9db..552b757 100644 --- a/src/main/java/com/application/DB/DB.java +++ b/src/main/java/com/application/DB/DB.java @@ -200,13 +200,13 @@ public class DB { TREE_SPECIES = "Fura"; } - /* + System.out.printf("Tree species: \t%s\n", TREE_SPECIES); System.out.printf("Width: \t\t\t%s\n", DIMENSIONS); System.out.printf("Sawset: \t\t%s\n", SAWSET); System.out.printf("Moisture: \t\t%s\n", MOISTURE_GOAL); - */ + String treeSpecies = "AND LOWER(" + nameParameter + ") LIKE LOWER(" + '"' + "%" + TREE_SPECIES + "%" + '"' + ") "; String dimensions = "AND LOWER(" + nameParameter + ") LIKE LOWER(" + '"' + "%" + DIMENSIONS + "%" + '"' + ") "; @@ -255,7 +255,7 @@ public class DB { } else break; } allDryingPeriods.putAll(results); - index = results.size(); + index += results.size(); } System.out.println(allDryingPeriods.size()); for (Map.Entry<Integer, Map<String, Number>> entry : allDryingPeriods.entrySet()) { -- GitLab