1

Can we fetch MySql table data into Phonegap Android? or to make a Web-service for JSON result is must?

Anoop Vaidya
  • 46,283
  • 15
  • 111
  • 140
Abdulqadir_WDDN
  • 658
  • 6
  • 22

1 Answers1

0

You should write a webservice which will act as an API to your database with methods returning JSON (or XML).

The webservice methods can then be called from your PhoneGap project (I would recommend having a look at the jquery ajax api http://api.jquery.com/jQuery.ajax/).

Updated

I am not sure about mySQL but you can do this with SQLite.. here is the example

Nimit
  • 1,714
  • 3
  • 22
  • 33
  • Thanks for reply i know which you have mentioned above but my question is that, Is there any other way without using Web-service? or for phonegap we have to use webservices? – Abdulqadir_WDDN Dec 29 '12 at 08:43
  • To use a SQLite database is the very basic thing.i am asking for database like mysql,oracle etc.[other than sqlite] – Abdulqadir_WDDN Dec 29 '12 at 09:03