mysql - SQL query to populate relational combo php -


query: network

i having 2 combobox ( country , network), need populate network combo on basis of item selected in country combo.

table1: network

platform    network       location_id platform 1  operator 1     56 platform 1  operator 2     59 

table2 : location

location_id     city    country 56           hong kong   hong kong 109         tafuna       american samoa 59          delhi        india   

help me write sql query same please. in advance.

bind country dropdown location_id , country of location table value , text respectively. can use following query binding location -

select location_id, country location 

and binding network combo box, use following query :

select network, platform     network location_id = @location_id 

@location_id selected value in country dropdown list.

note : populate network combo in change event of country combo box.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -