Hi to all and thank you for this incredible project.
I'm under cc v6 and I want to build a search form for filtering my listings. The point where I'm stuck is under the where conditions rules list box, I can't really understand the sintax:
I have a read data function 'read_disponibilita_ig'
in the where conditions I want to reproduce the following statement where you will notice a first part, that I would like to be always filtered, and a second part with related keywords that I'm using in the search form. I'm trying to understand how to fill the where conditions rules list box:
first part
(
read_disponibilita_ig.input_tratta = Italia-Grecia
AND
read_disponibilita_ig.tipologia_dispo = cabina
)
second part (only if I'm submitting data to the search form)
AND
(
read_disponibilita_ig.input_reference = {data:keywords1}
OR
read_disponibilita_ig.input_date = {data:keywords2}
OR
read_disponibilita_ig.current_name = {data:keywords3}
}
I tried to place those conditions under the dedicated condtion boxes, and this will work but obviously in this way "the basic listing", I mean the one in first part that must not be filtered by the search form, is giving me a not desired list like in the debug, cause is getting the empty value into the search fields.
So the question is how I can make this statement to exclude the second part if I'm not submitting data to the form? I can't understand how to use IF ELSE in the where conditions rule list box, I checked this link for CCv5 that is using pure php but is not working as expected.
http://www.chronoengine.com/faqs/72-ccv5/5215-how-do-i-build-a-where-statement-in-ccv5.html
many thanks
I'm under cc v6 and I want to build a search form for filtering my listings. The point where I'm stuck is under the where conditions rules list box, I can't really understand the sintax:
I have a read data function 'read_disponibilita_ig'
in the where conditions I want to reproduce the following statement where you will notice a first part, that I would like to be always filtered, and a second part with related keywords that I'm using in the search form. I'm trying to understand how to fill the where conditions rules list box:
first part
(
read_disponibilita_ig.input_tratta = Italia-Grecia
AND
read_disponibilita_ig.tipologia_dispo = cabina
)
second part (only if I'm submitting data to the search form)
AND
(
read_disponibilita_ig.input_reference = {data:keywords1}
OR
read_disponibilita_ig.input_date = {data:keywords2}
OR
read_disponibilita_ig.current_name = {data:keywords3}
}
I tried to place those conditions under the dedicated condtion boxes, and this will work but obviously in this way "the basic listing", I mean the one in first part that must not be filtered by the search form, is giving me a not desired list like in the debug, cause is getting the empty value into the search fields.
SELECT COUNT(`read_disponibilita_ig`.`aid`) AS `read_disponibilita_ig.count` FROM `mwfao_chronoforms_data_form_disponibilita` AS `read_disponibilita_ig` WHERE ( `read_disponibilita_ig`.`input_tratta` = 'Italia-Grecia' AND `read_disponibilita_ig`.`tipologia_dispo` = 'cabina' AND `read_disponibilita_ig`.`venduta` = '0' ) AND ( `read_disponibilita_ig`.`input_reference` = '' OR `read_disponibilita_ig`.`input_date` = '' OR `read_disponibilita_ig`.`current_name` = '' );
So the question is how I can make this statement to exclude the second part if I'm not submitting data to the form? I can't understand how to use IF ELSE in the where conditions rule list box, I checked this link for CCv5 that is using pure php but is not working as expected.
http://www.chronoengine.com/faqs/72-ccv5/5215-how-do-i-build-a-where-statement-in-ccv5.html
many thanks