0

I want to create a BlackBerry app for OS 4.7 that connects to a remote MySQL database and fetches all rows from a table and displays them in the app.

I searched and some say that I can use PHP as a middleware for the app on the device to talk to instead of directly accessing the database.

Michael Donohue
  • 11,776
  • 5
  • 31
  • 44
developer
  • 5,178
  • 11
  • 47
  • 72
  • This is an exact duplicate of your own question: http://stackoverflow.com/questions/5031157/connecting-blackberry-app-to-mysql-database – Michael Donohue Feb 24 '11 at 18:07

1 Answers1

1

You probably have that database on a server. You cannot access the database directly from the application on your device. Instead you can build a web service that accesses that database and returns the information to the application in a easy to parse format(xml/json). The application would then access the web service and parse the response it returns.

Mugur
  • 1,019
  • 9
  • 21
  • Thanks for your reply. Can you help me out with the code for that. I want to use php and json but I have no idea how will I accompalish this. – developer Feb 22 '11 at 15:02
  • I'm sorry, i don't have experience working with php so i can't help you with that. – Mugur Feb 23 '11 at 00:06
  • Try this: http://davidwalsh.name/web-service-php-mysql-xml-json I found that link here: http://stackoverflow.com/questions/4242355/php-web-service-example – Mugur Feb 23 '11 at 00:06