Reputation: 18159
I have been interested in working with a MySQL database in my iPhone or Mac projects. How is a connection performed in Objective-C?
I only had a bit of experience with PHP, but heck, that is a bit too different =/
Upvotes: 8
Views: 45662
Reputation: 10351
If you want to connect to a MySQL database, use MySQL's Connector/C API library which, as Objective-C is a strict superset of C, you can use without any issues. I helped someone with the installation of it here.
Upvotes: 1
Reputation: 9
Try absrd which recycles connections across concurrent threads (queues).
Upvotes: 1
Reputation: 15115
Check this tutorial for connectivity with SQLite.
You will not be able to connect to MySQL directly from the iPhone. You must use some intermediate layer such as a Web application with PHP.
So, you will have something like this:
You can use this technique to query and insert/update/delete data.
Once I found this library for MySQL, and I am aware how it works.
Upvotes: 13
Reputation: 21880
It's a much better option not to deal directly with MySQL, but use Apple's Core Data API.
It allows you to manage an relational database without having to write SQL. It's very fast, very useful. Good stuff.
Upvotes: 3