pre filter query

blondie63

New Member
Hi, i'm new on Fabrik
i don't understand the syntax for field "Pre-filter query" editing a List
is there any samples, screenshoot or detailed docs ?
pre_filter_query.png
 
I've just seen this link but there's no samples..
So in "Pre-filter query" field i can punt something like "SELECT * FROM table WHERE myfield = 'xxx' ?
And then ?
thanks for help
 
Because i've date saved on varchar field and i've to query all records with date > now() i've tried to use pre-filter-query but i'm still not understand very well ! sorry
I see that Field dropdownbox list only table fields so i don't understand where i've to user $q->fieldname..
This is my pre-filetr-query:
SELECT TRUE FROM `JM_rbiasio`.`xdv3r_ash_prenotazioni` WHERE (STR_TO_DATE(`pre_data`,'%d/%m/%Y %h:%i:%s') >=NOW()) ORDER BY `data` DESC;

I've tried so:
pre_filter_query_mm.png

But does'nt work, this filter is ignored and all records are returned

Can you help me ?
Thanks
 
No idea what you are trying to do:
SELECT TRUE ... will always return 1 (for every record) (TRUE is a reserved word)
{$q->TRUE} = 1 is no valid php
you didn't select any element for this prefilter

you could do something like
SELECT `foo` FROM table WHERE... LIMIT 1
in value:
return {$q->foo} == 1;
(Type Eval)
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top