Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can i use MYSQL database connection in iphone application useing cocos2d?

I am working on project and i need to connect MYSQL database. I am success to connect SQLite in my project ( using cocos2d).But i can not connect MYSQL database in my project. I any one do like this than help me for how to connect . Give me the necessary information.

like image 829
Rana Avatar asked Dec 30 '22 03:12

Rana


1 Answers

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:

  1. iPhone POSTING a request to the WebServer using HTTP
  2. Web Server connecting to the MySQL database
  3. Web Server returning data to the iPhone (XML, plain text)
  4. iPhone processing the data

You can use this technique to query and insert/update/delete data.

like image 158
Pablo Santa Cruz Avatar answered May 19 '23 19:05

Pablo Santa Cruz