Hi,
in my registration form I have 4 Query drop-down fields:
cb_regione (the regione has more provincie)
cb_provincia (the provincia has more città)
cb_citta (the città can have more than one cap)
cb_cap
the table where this informations are found is called comune_cap_prov_regioni and has the following structure
Id
comune
cap
prov
provincia
regione
Referring to the following example:
www.joomlapolis.com/documentation/345-cb-query-field/tutorials/18533-configuring-dynamic-usa-state-city-zip-fields-with-cb-query-
field-pluginIn, I entered in the query field of the region (cb_regione) with the following sql statement:
SELECT DISTINCT `regione` FROM` comune_cap_prov_regioni` ORDER BY `regione`
The cb_regione field is populated by all regions and everything is "OK".
In the other fields, I have entered the respective SQL instructions but they remain empty:
For cb_provincia:
SELECT DISTINCT `provincia` FROM` comune_cap_prov_regioni` WHERE `regione` = '[cb_regione]' ORDER BY` provincia`
For cb_citta
SELECT DISTINCT `comune` FROM` comune_cap_prov_regioni` WHERE `provincia` = '[cb_provincia]' ORDER BY` comune`
For cb_cap
SELECT DISTINCT `cap` FROM` comune_cap_prov_regioni` WHERE `comune` = '[cb_citta]' ORDER BY` cap`
Could you please help me understand what I did wrong?
Probably it is the "WHERE" condition, but I don't understand what, it is the same as the example.
A thousand thanks
Gabriella