kensy11
asked on
php Search
Hello,
I just want to ask how difficult it is to make a search using php ...
for example , for a dating site it it should return the people that are in the given city and the the people who live 5 km away form that given city .
is it difficult to make ? is there any tutorial for it or ...
thank you
I just want to ask how difficult it is to make a search using php ...
for example , for a dating site it it should return the people that are in the given city and the the people who live 5 km away form that given city .
is it difficult to make ? is there any tutorial for it or ...
thank you
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Persons_table:
int ID
varchar Name
varchar City
You would make an SQL call with PHP like this:
$q = 'select `Name` from `Persons_table` where `City` = "Canton"';
mysql_query($q);
To get people within 5 miles of that city, you would have to find what cities are within 5 miles of that city. To do this, you might need to have a zip code for your user. See this application for an example of how it might work:
http://www.zip-codes.com/zip-code-radius-finder.asp?zipMilesLow=5&zipMilesHigh=5&zip1=44714&Submit=Search