本地数据库作为 webapp 中的后备/离线数据库

发布于 2024-12-27 20:29:26 字数 253 浏览 1 评论 0原文

我有一个适用于 iPad 的网络应用程序(仅适用于 iPad),它使用 MySQL 数据库和 PHP 来处理数据。该应用程序仅使用 SELECT,而不使用 INSERT 和 UPDATE 到数据库。

但是您需要在线才能使该应用程序运行,但我正在考虑使该应用程序也可以离线使用。我的问题是如何使 MySQL 数据库离线,以及如何使应用程序在离线时使用本地/离线数据库,在在线时使用 MySQL 数据库? 如果用户在离线使用后在线,则数据库应更新以检查在线数据库中是否有任何更改。

I have a webapp for iPad (its only for iPad) that uses a MySQL database and PHP to handle the data. The app is only using SELECT, no INSERT og UPDATE to the database.

But you are required to be online for the app to work, but I'm considering making the app usable offline aswell. My question is how do I make a MySQL database offline and how do I make the app use the local/offline database if offline and the MySQL database if online?
If the user is online after using it offline the database should update to check if there is any changes in the online database.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文