first thanks for your module(s) I think I'll will be able to do any request I want with views now.
I got two exposed filters says field_cckA and field_cckB I need to compute together to create a new value that will be used in the WHERE clause :
SQL filter code :
$field_cckA = $_GET['exp_filter_nameA']
$field_cckB = $_GET['exp_filter_nameB']
[...]
return 'field_cckC = new_value($field_cckA,$field_cckB) ; '
I was wondering if the module proposes something to alter the request already generated by views because of the exposed filters.
or in other word, how to define exposed filter and prevent views to filter them by itself, and let me handle "$Gets" using the views PHP module ?
For now.. I dont know how I can do this using views.
Comments
Comment #1
littleneo commentedComment #2
littleneo commentedok, found a way,
maybe not academic but working and as I found no doc about this :
. add your exposed filters as usual in a view
. perform a search in the preview, with some value in each of your exposed filter.
. under the preview, copy the generated mysql request (everything in the Query div) paste it in a text editor
. add this before the query :
$view->build_info['query'] = ". and this at the end
" ;. select all and copy
. create a global PHP filter
. paste the code in the Setup Code field
from now, the Query is completely writtable by you, and exposed filters are shown but are not used by the query. you can now perfom changes to the complete query by adding things like :
$scl = (isset($_GET['filter_identifier_name']) && $_GET['filter_identifier_name'] != 2) ? $_GET['filter_identifier_name'] : 2 ;on top of the setup code and use variables to hack the Query by yourself.
Comment #3
liam morlandDrupal 6 is no longer supported. If this applies to a later version, please re-open and update the version.