魔法记录被删除
我已经定制了 oscommerce 来提取产品的 csv 文件,删除任何没有图像/正确描述/正确标题的内容。
导入以 cron 作业为基础运行,从供应商处提取信息,它从昨天起就没有运行,但产品消失了 -
使用过 oscommerce 的任何人都会知道,产品信息存储在多个表中。例子是-
产品 产品描述
等。让我知道信息已从产品表中删除,但没有从产品描述表中删除。
正在删除的产品是手动输入的产品,在产品表的型号项上带有特殊标签/前缀。因此根本不应该触碰。我对发生的事情一无所知。
mysql是否有完整性检查删除记录? oscommerce 上还有另一个插件吗?
i have customised oscommerce to pull in a csv file of products, delete anything thats not with an image/proper description/proper title gets removed.
The import runs on a cron job basis pulling information from a supplier, it hasnt run since yesterday but a product has disappeared-
Anyone who has used oscommerce will know that, product information is stored over multiple tables. example is-
products
product_description
and so on. the thing that has got me that the information is deleted from the product table but not from the product_description table.
The product that is being deleted is a manually input one which carries a special tag/prefix on the model item of the product table. Therefore shouldn't be touched at all. Am clueles as what is going on.
Is there mysql integrity checks deleting records? could there be another plugin working on oscommerce?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您可以识别表中的“神奇”行,则可以在该表上创建一个 BEFORE DELETE 触发器来检查某人计划删除的行是否是其中之一,如果是,则引发错误。我已经有一段时间没有创建触发器了,所以我忘记了语法,但是这里有更多关于触发器的信息... http://dev.mysql.com/doc/refman/5.0/en/create-trigger.html
If you can identify 'magic' rows in your table you could create a BEFORE DELETE trigger on that table to check the row someone is planning to delete isn't one of them, and raising an error if it is. I haven't created a trigger for quite a while so I forget the syntax, but there's more about triggers here... http://dev.mysql.com/doc/refman/5.0/en/create-trigger.html