1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-09 16:26:59 +02:00
This commit is contained in:
Ryan Cramer
2023-08-01 09:31:24 -04:00
parent 0245895d39
commit df08140712

View File

@@ -2176,6 +2176,13 @@ class PageFinder extends Wire {
}
$sql .= ")";
}
if($ft instanceof FieldtypeMulti && !$ft->isEmptyValue($field, $value)) {
// when a multi-row field is in use, exclude match when any of the rows contain $value
$tableMulti = $table . "__multi$tableCnt";
$bindKey = $query->bindValueGetKey($value);
$query->leftjoin("$table AS $tableMulti ON $tableMulti.pages_id=pages.id AND $tableMulti.$col=$bindKey");
$query->where("$tableMulti.$col IS NULL");
}
} else if($operator == '<' || $operator == '<=') {
// less than