Results 1 to 2 of 2

Hybrid View

  1. #1
    Join Date
    Dec 2006
    Posts
    27
    Plugin Contributions
    0

    Default Remove Corrupted Customers from database

    [FONT=Arial]Can any one advise how to remove a block of about 30 customers in the database containing around 1200. Would it be permissible to go into the [/FONT] [FONT=&quot][FONT=Arial]sql data base and delete the lines and do we have to do anything els[/FONT]e.

    [/FONT]
    [FONT=&quot]We only just discovered that 33 customer records had become corrupted, we think this happened when our site was hacked in July.

    I openned a pervious version containing these missing customer details and extracted the their details from the table "Customers", then tried to merge the data with our existing SQL database

    I got a successful load using notepad and CSV, but it broke all the other customers

    As a precaution I had backed up this table, but on restoring to this backup the customers are still broken. The data in the SQL tables looks ok, but within the shop you can no longer see any details - first name, last name, email or address.

    I then made the mistake of asking our webhosting company to restore the site to a copy we had made a few hours earlier on their server before I had touched the SQL files. We have even bigger problems with all customers broken and the following errors;


    Warning: array_merge() [function.array-merge]: Argument #1 is not an array in ...../customers.php1020

    Warning: array_merge() [function.array-merge]: Argument #2 is not an array in ..../customers.php1022

    Warning: reset() [function.reset]: Passed variable is not an array or object in ..../includes/classes/object_info.php on line 29

    Warning: Variable passed to each() is not an array or object in ..../includes/classes/object_info.php on line 30

    Our ISP dissolved the back up file as well doing the restore we were not aware this would happen. Any help or advice much appreciated!
    on line on line [/FONT]

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Remove Corrupted Customers from database

    Customer information is stored in:
    customers
    customers_info (1 record per customer)
    address_book (1 to many records per customer)
    customers_basket (1 record per customer)
    customers_basket_attributes (1 to many per customer)

    Each table has a customers_id except the customers_info that uses the customers_info_id for this value ...


    NOTE: the following do NOT necessarily need to be touched ...

    You also have to consider the Orders for these customers, in theory, all data is stored in the order even without a valid customer, so these could be left in place without a problem:
    orders
    orders_products
    orders_products_attributes
    orders_status_history
    orders_total

    If using File Uploads:
    files_uploaded

    If using PayPal:
    paypal
    paypal_payment_status_history

    If using Nochex:
    nochex_apc_transactions

    If using AuthorizeNet:
    authorizenet

    I believe that covers all of the tables to check for this ...

    NOTE: as the Order tables are more historical so leaving them in place would be a good idea ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 

Similar Threads

  1. How to remove all customers and previous orders from database?
    By josee225 in forum Managing Customers and Orders
    Replies: 1
    Last Post: 14 Apr 2011, 11:48 PM
  2. Database - add new customers from old database
    By ljdream00 in forum General Questions
    Replies: 0
    Last Post: 6 Apr 2011, 05:43 AM
  3. re: customers dbase table corrupted. How can I create new one
    By anthonytjm in forum General Questions
    Replies: 0
    Last Post: 2 Aug 2010, 03:19 PM
  4. Database is corrupted?
    By blueskymama in forum General Questions
    Replies: 2
    Last Post: 1 Apr 2007, 12:27 AM
  5. Database corrupted when exported
    By magicpants in forum General Questions
    Replies: 2
    Last Post: 2 Nov 2006, 01:42 PM

Posting Permissions

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