thank you very much, it works
I have 2 groups of fields to look for, I did it but it does not work:
<?php
add_filter ('bps_field_sql', 'change_query', 10, 2);
function change_query ($sql, $f)
{
if ($f->id == 127) $sql['where']['field_id'] = 'field_id IN (127,129,131)';
return $sql;
}
?>
<?php
add_filter ('bps_field_sql', 'change_query2', 10, 2);
function change_query2 ($sql, $f)
{
if ($f->id == 149) $sql['where']['field_id'] = 'field_id IN (149,152,155)';
return $sql;
}
?>
Hello Mirko,
Which group doesn’t work? The first, the second, or both?
Are the two groups independent, or related (say, ‘make of car’ and ‘model of car’)?
the first works, the second does not.
they are not related to each other
Hi Mirko,
Which type are the fields in the second group? E.g. Radio Buttons, Checkboxes, …?
How is the search wrong, in the second group?
E.g. you search for value ‘xyz’, and you find members who don’t have the value ‘xyz’ in any of their profile fields 149, 152, or 155;
or, you search for value ‘xyz’, and you don’t find two members who actually have the value ‘xyz’ in their profile field 152.