Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
230 views
in Technique[技术] by (71.8m points)

iPhone application Getting data from Mysql database

I am creating store locator application. This application should show nearest store to given latitude and longitude.

I can get latitude and longitude. I have data in my Mysql database on server containing information regarding stores and their corresponding latitude and longitudes.

1. Is it secure to connect MySQL database through application(because i have to connect to database to get nearest stores through Haversine formula.). 
2. how can i implement whole process. 

Update:---

Basically i till now i can get my location coordinates like longitude and latitude. I can get nearest stores in table form using googlePlaces but i want to add opening and closing time as well. So i was thinking about connecting mySql database having all information. But main point is getting nearest stores. I have searched a lot and found there is haversine formula for that. i have found tutorial using haversine with php and mysql. but i dont know php.So please suggest me any way with which i can accomplish this.

Thanks

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Normally you would use a webservice (via SOAP, REST, JSON, …) for such tasks, as this would prevent opening the database-server to the public and also makes you independent from the used programming language.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...