1
Magento 1.9.1
Porto theme

I am now trying to delete stored credit card numbers from our database using phpMyAdmin as per my question here:

How to purge (delete) credit card numbers stored on Magento 1.9.1.0?

I made me a list of SQL commands to run:

UPDATE sales_flat_order_payment SET cc_number_enc=NULL;
UPDATE sales_flat_order_payment SET cc_type=NULL;
UPDATE sales_flat_order_payment SET cc_last4=NULL;
UPDATE sales_flat_order_payment SET cc_owner=NULL;
UPDATE sales_flat_order_payment SET cc_exp_month=NULL;
UPDATE sales_flat_order_payment SET cc_exp_year=NULL;


UPDATE sales_flat_quote_payment SET cc_number_enc=NULL;
UPDATE sales_flat_quote_payment SET cc_type=NULL;
UPDATE sales_flat_quote_payment SET cc_last4=NULL;
UPDATE sales_flat_quote_payment SET cc_owner=NULL;
UPDATE sales_flat_quote_payment SET cc_exp_month=NULL;
UPDATE sales_flat_quote_payment SET cc_exp_year=NULL;

I think I must be doing something wrong...this is how I go about doing this:

There are 2 databases:

mySITE_mySITE

information schema

I highlight either, click on SQL, and enter the following lines (one at a time):

UPDATE sales_flat_order_payment SET cc_number_enc=NULL;
UPDATE sales_flat_order_payment SET cc_type=NULL;
UPDATE sales_flat_order_payment SET cc_last4=NULL;
UPDATE sales_flat_order_payment SET cc_owner=NULL;
UPDATE sales_flat_order_payment SET cc_exp_month=NULL;
UPDATE sales_flat_order_payment SET cc_exp_year=NULL;


UPDATE sales_flat_quote_payment SET cc_number_enc=NULL;
UPDATE sales_flat_quote_payment SET cc_type=NULL;
UPDATE sales_flat_quote_payment SET cc_last4=NULL;
UPDATE sales_flat_quote_payment SET cc_owner=NULL;
UPDATE sales_flat_quote_payment SET cc_exp_month=NULL;
UPDATE sales_flat_quote_payment SET cc_exp_year=NULL;

But then it gives me the following Errors:

Error SQL query: UPDATE sales_flat_order_payment SET cc_number_enc=NULL MySQL said:

1146 - Table 'mySITE_mySITE.sales_flat_order_payment' doesn't exist

Error SQL query: UPDATE sales_flat_order_payment SET cc_number_enc=NULL MySQL said:

1109 - Unknown table 'sales_flat_order_payment' in information_schema

What do I need to do to make this work?

0

it turns out that all that I needed to do was to add mg_ in front of the code like this:

UPDATE mg_sales_flat_order_payment SET cc_number_enc=NULL;
UPDATE mg_sales_flat_order_payment SET cc_type=NULL;
UPDATE mg_sales_flat_order_payment SET cc_last4=NULL;
UPDATE mg_sales_flat_order_payment SET cc_owner=NULL;
UPDATE mg_sales_flat_order_payment SET cc_exp_month=NULL;
UPDATE mg_sales_flat_order_payment SET cc_exp_year=NULL;


UPDATE mg_sales_flat_quote_payment SET cc_number_enc=NULL;
UPDATE mg_sales_flat_quote_payment SET cc_type=NULL;
UPDATE mg_sales_flat_quote_payment SET cc_last4=NULL;
UPDATE mg_sales_flat_quote_payment SET cc_owner=NULL;
UPDATE mg_sales_flat_quote_payment SET cc_exp_month=NULL;
UPDATE mg_sales_flat_quote_payment SET cc_exp_year=NULL;

And now it works!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.