Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2011

    Unanswered: Program/script to drop info

    Evening gents,

    I've got a question to ask...

    I'm opening an ecommerce store, and although the database encrypts credit card info, I would sleep much better at night if I was able to run some type of program or script to delete or null certain cells?

    If so, could one of you kindly point me in the right direction?


  2. #2
    Join Date
    Sep 2009
    San Sebastian, Spain
    Firstly, be sure that by changing the values in the database you are not going to break the e-commerce side of your application. For example, if there is another process that absolutely needs this information could crash if this is set to NULL.

    There are two options available, the first is to schedule a job to run at regular intervals which issues an UPDATE statement to NULL fields that are not already null.

    UPDATE table SET field = NULL WHERE field IS NOT NULL

    The second option is to use a trigger so that when an entry is either inserted or updated we set the field to NULL at this point. This means the data will never get stored in the database.

    Hope this helps?
    Ronan Cashell
    Certified Oracle DBA/Certified MySQL Expert (DBA & Cluster DBA)
    Follow me on Twitter

  3. #3
    Join Date
    Jul 2011
    Ronan, I'll definitely look into those options.

    Thank you!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts