Skip to content
Snippets Groups Projects
Commit 2eb1694e authored by Guillaume Heurtier's avatar Guillaume Heurtier
Browse files

FEAT #13339 TIME 0:05 exclude empty values from duplicates query

parent d95d3988
No related branches found
No related tags found
No related merge requests found
......@@ -967,7 +967,7 @@ class ContactController
foreach ($criteria as $criterion) {
$subQuery = "SELECT " . $criterion . ' as field FROM contacts c GROUP BY field HAVING count(*) > 1';
$where[] = $criterion . " in (" . $subQuery . ") ";
$where[] = $criterion . " in (" . $subQuery . ") AND " . $criterion . " != '' AND " . $criterion . " is not null";
}
$duplicatesQuery = "SELECT " . implode(', ', $fields) . ' FROM contacts WHERE ' . implode(' AND ', $where);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment