Hello Drupspec, I fiddled a whole day now with this - maybe some view expert could help me.
I wanted a view which dynamically takes a postal code as an argument
and returns all nodes with a postal code within a specific range (50KM).
I created a view, and in Views argument handling code I insert the following:

// @return an array of nearby postal codes within 50 KM
$nearby = get_nearby_postal_codes ( $zip, 50 );
// formatting for "IN" query
$nearby = implode (',', $nearby);
$view->filter[1][operator] = 'OR';
$view->filter[1][value] = $nearby;

What i expected in the query:
node_data_field_postleitzahl.field_postleitzahl_value IN ('zip1','zip2'...)

What IS in the query:
The complete filtering for this value is gone

If I dont touch the operator, the query looks:

node_data_field_postleitzahl.field_postleitzahl_value LIKE ('zip1','zip2'...)

which does not the job in my case.

Does anyone have an Idea how i can force the IN, instead of LIKE with a textfield?
I think in an number-field the operator='or' forces the view to use the IN- statement.

Best Regards

Comments

sun’s picture

Status: Active » Closed (won't fix)

Sorry, unfortunately this support request is way too specific. Please have a look at the issue queue - Views maintainers are buried already. You might want to try to get further support at http://drupal.org/support. Additionally, the answer to your question might be covered in the handbooks at http://drupal.org/handbook/modules/views already.
If you were able to solve this issue on your own in the meantime, you might want to add the involved steps to this closed issue, so other users searching for a similar solution might find it.