Как соединиться с базой данных MySQL от iPhone?

Посмотрите здесь

Текущая реализация сохраняет массив целых объектов для всех целых чисел от -5 до 256, когда вы создаете int в этом диапазоне вы фактически просто возвращаете ссылку на существующий объект.

blockquote>

14
задан Chris Hanson 31 January 2009 в 05:42
поделиться

2 ответа

Assuming you have some experience with server-side programming (like PHP or Rails), you could just create an 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

13
ответ дан 1 December 2019 в 14:12
поделиться

А быстрый Google покажет Вам путь...

2
ответ дан 1 December 2019 в 14:12
поделиться
Другие вопросы по тегам:

Похожие вопросы: