根据参考 ID 删除行
我正在开发一个 AIR 应用程序,该应用程序使用本地 SQL lite DB 来存储信息,然后在每天结束时将数据发布到服务器上的 MySQL DB。数据按用户会话成组发布。数据发布后,我需要根据会话 ID 删除与该会话关联的所有行。我读过这个网站上的很多帖子,也看到了很多方法来做到这一点 - 不幸的是,我几乎没有成功让它们在 SQL lite Manager 中运行 - 在将其放入操作脚本代码之前,我一直在其中进行测试。以下是这样的一种尝试:
DELETE vendor_interest
FROM vendor_interest v
INNER JOIN screen_view s on s.id = v.screen_view_id
and s.session_id = 44
screen_view 表引用了会话 ID 和vendor_interest 表,我在其中尝试删除与会话关联的所有行。
I am working on an AIR application that uses a local SQL lite DB to store information before it posts the data to a MySQL DB on the server at the end of each day. The data is posted in sets by user sessions. Once the data has posted i need to delete all rows associated with that session based on the session id. I have read many posts on this site and seen many ways to do this - unfortunately i have had little success getting them to run in SQL lite Manager - where i have been testing before i place it into the actionscript code. the following is one such attempt:
DELETE vendor_interest
FROM vendor_interest v
INNER JOIN screen_view s on s.id = v.screen_view_id
and s.session_id = 44
The screen_view table has the reference to the session ID and to the vendor_interest table where i am trying to delete all the rows associated with the session.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你可以尝试这样的事情:
You can try something like this: