Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

need SQL statment that will change all of the cc_number


spencermjax

Recommended Posts

I need an SQL statment that will change all of the cc_number in the orders table to XXXXXXXXXXXX1234.

 

I need the 1st 12 numbers of each card number to be changes to 'XXXXXXXXXXXX' and leave the last 4 digits.

 

I have a masking script already installed but I need to go back and update all past orders. Doing it one by one is killing me.

Link to comment
Share on other sites

I found this:

 

Credit Card numbers cleaner

 

I don't know anything about it other than it exists....

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Try w3.schools.com and google

 

Words to look for are

 

UPDATE

SET

concat

right

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

I need an SQL statment that will change all of the cc_number in the orders table to XXXXXXXXXXXX1234.

 

I need the 1st 12 numbers of each card number to be changes to 'XXXXXXXXXXXX' and leave the last 4 digits.

 

I have a masking script already installed but I need to go back and update all past orders. Doing it one by one is killing me.

 

1. backup your database.

 

2. try:

update orders set cc_number = concat('xxxxxxxxxxxx', substr(cc_number, 13, 4));

Link to comment
Share on other sites

  • 2 weeks later...

Have you tried this...

 

http://addons.oscommerce.com/info/1072

 

Validated the Credit Card, and want to remove it from the database, but keep the customers order history intact ?

 

Card Zapper, lets you xxxxx out the card number of any order you choose !

 

Helps to make things a bit more secure.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...