I have a server-side php-script that fetches results from a MySQL table. I am trying to retrieve these results from within an iPhone OS app. I am using the following method:
NSURL *myURL = [NSURL URLWithString:@"http://www.someurl.com/login.php?id=anid"];
NSArray *sqlResults = [[NSArray alloc] initWithContentsOfURL:myURL];
//Show me what went into the Array
NSLog(@"%@", [sqlResults ObjectAtIndex:0]);
*The NSLog at the bottom is me trying to see what just transpired. The NSLog statement is printing out (null) though -- so I am stuck. My problem is that I don't know what the heck I am trying to do with the NSArray of results and I am probably doing many things wrong. Is an internet connection implied (Have Cellular and Wi-fi)? So, my question is: What should I be doing to get MySQL query-results using -initWithContentsOfURL?