If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Program/script to drop info

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-27-11, 00:59
JsonV JsonV is offline
Registered User
 
Join Date: Jul 2011
Posts: 2
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?

Thanks!
Reply With Quote
  #2 (permalink)  
Old 07-27-11, 04:37
it-iss.com it-iss.com is offline
Registered User
 
Join Date: Sep 2009
Location: San Sebastian, Spain
Posts: 620
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
Senior Oracle/MySQL DBA
http://www.it-iss.com
Reply With Quote
  #3 (permalink)  
Old 07-27-11, 11:02
JsonV JsonV is offline
Registered User
 
Join Date: Jul 2011
Posts: 2
Ronan, I'll definitely look into those options.

Thank you!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On