php - Having trouble with Inner Join SQL -


i've got 2 tables:

cyclist = dob, name, iso_id

country = country_name, gdp, population, iso_id.

i need query cyclist.name, country.country_name, country.gdp, country.population.

using 2 dates entered user. these 2 dates used search cyclists born between dates.

this i've tried far:

select cyclist.name, country.country_name, country.gdp, country.population cyclist inner join country on cyclist.iso_id = country.iso_id cyclist.dob between '$date1' , '$date2' 

however it's not working , dont know why.

can offer insight?

you can use

select cyclist.name, country.country_name, country.gdp, country.population cyclist left join country on cyclist.iso_id = country.iso_id cyclist.dob>='$date1' , cyclist.dob<='$date2' 

Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -