直接从iPhone执行SQL查询到在线服务器 [英] Directly perform SQL queries from iPhone to an online server

查看:297
本文介绍了直接从iPhone执行SQL查询到在线服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一个新手,并且倾向于做一个简单的iOS应用程序。

I'm a newbie and tend to do a simple iOS applications.

任务是创建一个为某人注册的应用程序,然后将该数据上传到在线服务器。

The mission is making an app that does the registeration for a person and then upload that data to an online server.

具体来说,我想插入 delete 更新数据直接到在线服务器。

In detail, I want to insert, delete, update data directly to online server.

有人会告诉我我要做什么(工具,库...)?

Would anyone show me what I have to do with (tool, library...)?

我已经与SQlite合作为iPhone制作了一个本地数据库,并且运行良好,现在是关于处理在线服务器。

I have worked with SQlite to make a local database for the iPhone and it worked well, now it is about dealing with an online server.

推荐答案

对于执行远程请求,有两种方式:

For performing remote request there are two ways:

1) https://github.com/smhuang426/MySqueakQl - 这是远程访问数据库的基本实现。 http://www.karlkraft。 com / index.php / 2010/09/17 / mysql-for-iphone-and-osx / - 更高级,在文章中你可能会有一些说明如何使用这个框架。在这种情况下,您使用SQL C API,您可以编写自己的特殊类。示例: http://blog.iosplace.com/?p=30 http://zetcode.com/tutorials/mysqlcapitutorial/ 以及C API的说明 http://dev.mysql.com/doc/refman/5.0/en/c -api-function-overview.html

1) https://github.com/smhuang426/MySqueakQl - this is "basic" implementation for remote access to DB. http://www.karlkraft.com/index.php/2010/09/17/mysql-for-iphone-and-osx/ - more advanced, in articles you may some instructions how use this framework. In this case you use SQL C API and you can write your own special classes. Example: http://blog.iosplace.com/?p=30 , http://zetcode.com/tutorials/mysqlcapitutorial/ and description of C API http://dev.mysql.com/doc/refman/5.0/en/c-api-function-overview.html

2)发布在在线服务器上的PHP脚本,您使用异步ASIHTTP(或普通NSRequest)脚本和脚本直接使用tis服务器上的sql DB。示例( iOS在iPhone应用程序和MySQL之间没有通信数据库通过PHP )。在这种情况下,你实现了更多的安全性,但也有一些限制,如减少应用程序的速度和服务器必须提供PHP。

2) PHP script that posted on online server, you use async ASIHTTP (or ordinary NSRequest) that send to this script, and script works directly with sql DB on tis server. Example ( iOS no communication between iPhone app and MySQL database via PHP). In this case you achieved more security, but also there some limitations like decrease of app's speed and server must supply PHP.

祝你好运!

这篇关于直接从iPhone执行SQL查询到在线服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆