如何将PhoneGap应用程序连接到服务器上的MySql数据库?

问题描述:

我试图建立一个中转移动应用程序,其数据存储在服务器上的MySql DB中。因为我的应用程序只是连接到MySql数据库和火查询/获取数据并显示给用户。我计划使用PhoneGap创建它,但我不明白我将如何连接到MySql DB做phonegap只允许本地数据存储使用SqlLite?有人可以简介我的建筑,我应该考虑到建设这个中转的应用程序。

I am trying to build a transit mobile application that has data stored in MySql DB on the server. Since my application is just going to connect to the MySql db and fire query/get the data and show it to the user . I was planning to create it using PhoneGap but i don't understand how will i connect to the MySql DB does phonegap only allow local data storage using SqlLite ? Can someone brief me on the architecture i should take into consideration for building this transit app.

您可以在PhoneGap应用程序中使用AJAX从MySQL数据库获取数据,处理这些调用。 CGI / PHP / Ruby / NodeJS等...所有这些都适合作业描述。

You can use AJAX in your PhoneGap app to get data from your MySQL DB, you will need a script on your server to handle these calls. CGI/ PHP/ Ruby/ NodeJS etc... all of these will fit the job description.