Zen Cart Logo
Forums / General Questions / HELP!!! Deleted customers table - Need to restore

HELP!!! Deleted customers table - Need to restore

Locked

Views: 1,716

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
9 Oct 2006, 2:39 AM
#1
heyzoos avatar

heyzoos

New Zenner

Join Date:
Mar 2006
Posts:
38
Plugin Contributions:
0

HELP!!! Deleted customers table - Need to restore

Hi-

Following a thread on how to clear out our customer database, someone recommended to "drop" this table...which I did. Now the table is gone and I cannot figure out how to re-create it. I didn't want to remove the table, just clear it out and start anew. Now it's gone. How can I re-add this table to my database without re-installing the entire zen cart?

Thanks.

9 Oct 2006, 2:43 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: HELP!!! Deleted customers table - Need to restore

  1. Which thread did you follow? Please share the link.

  2. Do you have a recent database backup?

If not, you're out of luck. Period. Gone. Poof.

Your hosting company might have backups, depending on what services you are paying for.

About backups:
https://www.zen-cart.com/tutorials/index.php?article=103

9 Oct 2006, 2:56 AM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: HELP!!! Deleted customers table - Need to restore

Wait a second ... rereading your post .... you wanted an empty table. :lookaroun

Okay ... to rebuild it, assuming you're using Zen Cart v1.3.5, paste this in your SQL window of phpMyAdmin:

CREATE TABLE customers (
  customers_id int(11) NOT NULL auto_increment,
  customers_gender char(1) NOT NULL default '',
  customers_firstname varchar(32) NOT NULL default '',
  customers_lastname varchar(32) NOT NULL default '',
  customers_dob datetime NOT NULL default '0001-01-01 00:00:00',
  customers_email_address varchar(96) NOT NULL default '',
  customers_nick varchar(96) NOT NULL default '',
  customers_default_address_id int(11) NOT NULL default '0',
  customers_telephone varchar(32) NOT NULL default '',
  customers_fax varchar(32) default NULL,
  customers_password varchar(40) NOT NULL default '',
  customers_newsletter char(1) default NULL,
  customers_group_pricing int(11) NOT NULL default '0',
  customers_email_format varchar(4) NOT NULL default 'TEXT',
  customers_authorization int(1) NOT NULL default '0',
  customers_referral varchar(32) NOT NULL default '',
  PRIMARY KEY  (customers_id),
  KEY idx_email_address_zen (customers_email_address),
  KEY idx_referral_zen (customers_referral(10)),
  KEY idx_grp_pricing_zen (customers_group_pricing),
  KEY idx_nick_zen (customers_nick),
  KEY idx_newsletter_zen (customers_newsletter)
) TYPE=MyISAM;
9 Oct 2006, 3:19 AM
#5
heyzoos avatar

heyzoos

New Zenner

Join Date:
Mar 2006
Posts:
38
Plugin Contributions:
0

Re: HELP!!! Deleted customers table - Need to restore

gee that sure worked....here's the thread #:

t=48358

9 Oct 2006, 3:22 AM
#6
heyzoos avatar

heyzoos

New Zenner

Join Date:
Mar 2006
Posts:
38
Plugin Contributions:
0

Re: HELP!!! Deleted customers table - Need to restore

I'm using Zen Cart 1.3.0.2

Will this SQL info still work?

Thanks.

9 Oct 2006, 3:27 AM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: HELP!!! Deleted customers table - Need to restore

Heyzoos:

I'm using Zen Cart 1.3.0.2

Will this SQL info still work?

Thanks.

In this case, yes.

9 Oct 2006, 3:39 AM
#8
heyzoos avatar

heyzoos

New Zenner

Join Date:
Mar 2006
Posts:
38
Plugin Contributions:
0

Re: HELP!!! Deleted customers table - Need to restore

Thanks Dr!!! This worked. Hopefully others don't run into that other post, or at least find this one afterwords.

9 Oct 2006, 3:41 AM
#9
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: HELP!!! Deleted customers table - Need to restore

Exactly.

... and people wonder why I hate giving out that kinda data ...

I've updated those posts with some warnings. Thanks.