Mercurial > hg > orthanc-databases
diff Resources/Orthanc/Databases/ISqlLookupFormatter.cpp @ 416:6b16914b6655
fix
author | Alain Mazy <am@osimis.io> |
---|---|
date | Thu, 22 Jun 2023 21:15:50 +0200 |
parents | 7e123f047771 |
children | c1b0f3c4e1f5 |
line wrap: on
line diff
--- a/Resources/Orthanc/Databases/ISqlLookupFormatter.cpp Thu Jun 22 18:07:41 2023 +0200 +++ b/Resources/Orthanc/Databases/ISqlLookupFormatter.cpp Thu Jun 22 21:15:50 2023 +0200 @@ -658,18 +658,19 @@ if (dicomIdentifiersComparisons.size() > 0) { - std::string comparisons; - Toolbox::JoinStrings(comparisons, dicomIdentifiersComparisons, " AND "); - sql += (" AND internalId IN (SELECT id FROM DicomIdentifiers WHERE " - + comparisons + ") "); + for (std::vector<std::string>::const_iterator it = dicomIdentifiersComparisons.begin(); it < dicomIdentifiersComparisons.end(); ++it) + { + sql += (" AND internalId IN (SELECT id FROM DicomIdentifiers WHERE " + *it + ") "); + } } if (mainDicomTagsComparisons.size() > 0) { std::string comparisons; - Toolbox::JoinStrings(comparisons, mainDicomTagsComparisons, " AND "); - sql += (" AND internalId IN (SELECT id FROM MainDicomTags WHERE " - + comparisons + ") "); + for (std::vector<std::string>::const_iterator it = mainDicomTagsComparisons.begin(); it < mainDicomTagsComparisons.end(); ++it) + { + sql += (" AND internalId IN (SELECT id FROM MainDicomTags WHERE " + *it + ") "); + } } if (!labels.empty())