selecting from drop list and display the right result using php mysql inner join -


i have search query include governorate district city

what need when user select governorate browser must display write result related selection , when user select governorate , district browser must display result related governorate , district , same village

the problem system display users related selection of governorate , district , village rresult sameeeee

query:

 $sql = mysql_query("select user_id,first_name, last_name, birth_date, registered_date,      s.specialization_name,     g.governorate_name,     d.district_name,     v.village_name            members u                        inner join  specialization s                          on u.specialization = s.specialization_id                         inner join governorate g                         on u.governorate = g.governorate_id                         inner join districts d                         on u.district = d.district_id                         inner join village v                         on u.village = v.id                        (governorate = '' or governorate = '$bygov') or                              (district = '' or district = '$bydist') or                              (village = '' or village = '$byvillage')")                              or die(mysql_error()); 

try use , compose options

$sql = mysql_query("select user_id,first_name, last_name, birth_date, registered_date,  s.specialization_name, g.governorate_name, d.district_name, v.village_name        members u                    inner join  specialization s                      on u.specialization = s.specialization_id                     inner join governorate g                     on u.governorate = g.governorate_id                     inner join districts d                     on u.district = d.district_id                     inner join village v                     on u.village = v.id                    (governorate = '' or governorate = '$bygov') ,                          (district = '' or district = '$bydist') ,                          (village = '' or village = '$byvillage')")                          or die(mysql_error()); 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -