Skip to content

Commit

Permalink
Fix Eigenschaften in Mitglied Query (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannMaierhofer authored May 29, 2024
1 parent 7ed5578 commit 63ac307
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/de/jost_net/JVerein/Queries/MitgliedQuery.java
Original file line number Diff line number Diff line change
Expand Up @@ -268,20 +268,21 @@ else if (control.getMitgliedStatus().getValue().equals("Abgemeldet"))
{
StringBuilder condEigenschaft = new StringBuilder(
"(select count(*) from eigenschaften where ");
boolean first = true;
condEigenschaft.append("eigenschaften.mitglied = mitglied.id AND (");
int count = 0;
for (Eigenschaft ei : eiu.get(eg))
{
if (!first)
if (count != 0)
{
condEigenschaft.append("OR ");
}
first = false;
count++;
condEigenschaft.append("eigenschaft = ? ");
bedingungen.add(ei.getID());
}
condEigenschaft.append(")) > 0 ");
condEigenschaft.append(")) = ? ");
addCondition(condEigenschaft.toString());
bedingungen.add(Integer.toString(count));
}
}
else
Expand Down

0 comments on commit 63ac307

Please sign in to comment.