View Full Version : Access an online SQL database?
Oct 27, 2009, 06:36 PM
I've read this (http://www.iphonedevsdk.com/forum/iphone-sdk-development/3711-access-mysql-remote-database-iphone.html) forum and it suggests that it is a bad idea to connect to an online database directly from the app. How do some apps like AroundMe and Showtimes get their data? I'm in need to access an online database which will constantly change so I cannot store it locally. Any ideas?
Oct 27, 2009, 08:02 PM
It is a bad idea to connect directly to a database. Instead, as the thread explains, its much better to talk to remote services using HTTP/AJAX/RMI/etc, which in turn are backed by a database.
Oct 28, 2009, 06:12 AM
Can you do that without a UIWebView?
Oct 28, 2009, 09:15 AM
You would typically use NSURLConnection to transfer requests to your server and to get results back. You could have a script on the server, say in php, that processes the request and returns the result.