views:

9266

answers:

4

I am trying to connect to a remote mysql database from an iPhone. I have searched many web sites but I did not find any help. If anyone has worked with this please send a solution.

+1  A: 

A quick google will show you the way...

Oli
Specifically look for http://mysql-cocoa.sourceforge.net/
Epsilon Prime
-1 Wouldn't it be clearer to have linked to mysql-cocoa.sourceforge.net and even state that it indeed does work on iphone.
bentford
Not really. Some people need to learn to use Google before opening a StackOverflow thread. Click the link and you'll see how lazy this question is.
Oli
A: 

use sqliteManager

sidhartha kumar das
-1 this is not a obj-c mysql library
bentford
A: 

well i have the resource of wordpress for iphone i dont remember were i find this but here are a form to manage data via web and i have an example with an sqllite data base downloaded from developer.apple.com

-1 unclear what this means.
bentford
+2  A: 

Assuming you have some experience with server-side programming (ie PHP), you could just create a NSArray from the content of a URL where you establish a connection to the MySQL server and print the results you want in ASCII or XML format.

NSURL *myURL = [NSURL URLWithString:@"http://www.myserver.com/results.php"];
NSArray *sqlResults = [[NSArray alloc] initWithContentsOfURL:myURL];

Also useful to help you format the results printed by the server page: http://developer.apple.com/iphone/library/documentation/Cocoa/Conceptual/PropertyLists/Introduction/Introduction.html

Sam V