duanqiang2617 2010-06-10 12:57
浏览 18

魔术记录被删除

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?

  • 写回答

1条回答 默认 最新

  • doujian0265 2010-08-07 09:02
    关注

    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

    评论

报告相同问题?

悬赏问题

  • ¥15 微信会员卡等级和折扣规则
  • ¥15 微信公众平台自制会员卡可以通过收款码收款码收款进行自动积分吗
  • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
  • ¥15 gdf格式的脑电数据如何处理matlab
  • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
  • ¥100 监控抖音用户作品更新可以微信公众号提醒
  • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
  • ¥70 2048小游戏毕设项目
  • ¥20 mysql架构,按照姓名分表
  • ¥15 MATLAB实现区间[a,b]上的Gauss-Legendre积分