adding two rules for one column beforeFilter

By using a beforeFilter, I’ve been able to successfully parse a header cell in my column in order to create rules to query the mysql table for different bounds of values. I can get “>3” and “<3” to show values for their respective bounds:

function custom_filter1($filter_by){ if (!sizeof($filter_by->rules)) $filter_by->add("exp_sum","value","LIKE"); $index = $filter_by->index("exp_sum"); if ($index!==false) { $op = ">"; $value = $filter_by->rules[$index]["value"]; if (preg_match("/^>(\d+\.?\d*)$/",$value,$matches)) { $filter_by->rules[$index]["value"] = $matches[1]; } else if (preg_match("/^<(\d+\.?\d*)$/",$value,$matches)) { $filter_by->rules[$index]["value"] = $matches[1]; $op = "<"; } $filter_by->rules[$index]["operation"]=$op; } }

Is there a way to add two rules for one column so that I can query ranges? For example, “2…5” would be two rules: >2 and <5. It doesn’t seem like you can just add another rule, as the operator just seems to disappear (see my last post.)

Filtering by many values tutorial: … any_values