请提供有关 Sencha Touch 数据库连接的帮助

发布于 2024-10-10 11:40:43 字数 242 浏览 0 评论 0原文

我是 Sencha Touch 的初学者。 我无法将我的网页(Sencha Touch)连接到数据库(MySQL)。 各个页面中有提交按钮,单击这些按钮会将数据发送到数据库。但在我的情况下,只能从第一页将数据发送到数据库。我应该注释所有其他页面的提交按钮处理程序,以从任何特定页面将数据发送到数据库。 还可以发送数据或检索数据——在一次执行中只能其中之一。 问题可能很愚蠢,但拜托,我现在真的很绝望地试图解决这个问题。 有人可以帮助我吗……

提前谢谢……

I am a beginner in Sencha Touch.
I am stuck with connecting my web pages(Sencha Touch) to the database(MySQL).
There are submit buttons in various pages which when clicked should send data to the database. But in my case sending data to the DB is possible only from the first page.I should comment the submit button handler of all other pages to send data to DB from any particular page.
Also sending data or retrieving data- only one of them is possible in a single execution.
Problem might be silly, but please I'm really desperate now trying to solve this.
Can someone help me please.........

Thanks in advance...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

鹊巢 2024-10-17 11:40:44

我猜你也混合了一些服务器代码,因为我不知道你还能如何让 JavaScript 应用程序直接读取和写入数据库服务器。

您应该使用 Ext.data.* 包将应用程序的模型存储绑定到某种服务器接口(例如 AJAX、REST、XML 等),并且这些代理的所有代理都具有完整的 CRUD 实现。

请参阅:http://dev。例如 sencha.com/deploy/touch/docs/?class=Ext#namespace?class=Ext.data.RestProxy

如果您的服务器提供一个 API 来提供响应更新的结果,我认为它会是简单地调整代理以使用该响应来保持两个数据存储(在服务器和客户端上)强同步。

但需要更多地了解您正在尝试做什么。

I'm guessing you have some server code in the mix too, since I don't know how else you would get a JavaScript app to read from and write to a database server directly.

You should be using the Ext.data.* package to bind your app's model stores to some sort of server interface (e.g. AJAX, REST, XML, etc etc) and all the proxies for these have full CRUD implementations.

See: http://dev.sencha.com/deploy/touch/docs/?class=Ext#namespace?class=Ext.data.RestProxy for example

If your server provides an API that provides results in response to an update, I think it would be simple to adapt a proxy to use that response to keep the two data stores (on server and client) strongly in sync.

But would need to know more about what you are trying to do.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文