How to setup select

Hi, i’ve got 2 fields

country_id
city_id

and 2 tables

country
id
name

city
id
name
country_id

i would like when select country see related city in second selector and store id from country and city in datatbase.
I see video on youtube but don’t work for me

first select work well with ajax refresh but second don’t change
show nothing:

SELECT id,name,country_id
FROM city
Where country_id = ‘(country_id)’

What’s wrong?

Re: How to setup select

Hi Fred, I see you have a problem in your code

Where country_id = ‘(country_id)’

you must use {} instead ()

Where country_id = ‘{country_id}’

Of course {country_id} should be the name of your first select field

Re: How to setup select

Thanks it’s good now.