I believe the filter handler in the 6.x version used to provide an "SQL filter code" box where you could use PHP to "Return a valid SQL WHERE clause."

This doesn't seem to be present in the 7.x version and I can't find any alternative modules that provide a similar feature.