Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Emptying Customers & Orders from database


mark27uk3

Recommended Posts

Hi Guys,

 

Just a quick one (hopefully)!

 

Can anyone tell me the sql for emptying the data from the customers and orders fields in the database please.

 

It will save me hours going through and clicking delete on each one twice.

 

Thanks

 

Mark :thumbsup:

Lifes a bitch, then you marry one, then you die!

Link to comment
Share on other sites

Hi Guys,

 

Just a quick one (hopefully)!

 

Can anyone tell me the sql for emptying the data from the customers and orders fields in the database please.

 

It will save me hours going through and clicking delete on each one twice.

 

Thanks

 

Mark :thumbsup:

 

Backup your database first:

 

1. mysqldump -u youruser -p youropassword databasename > databasename.sql

 

2. in mysql prompt: delete from customer; delete from orders;

 

3. Great tutorial site: http://www.webdevelopersnotes.com/tutorials/sql/index.php3

 

 

Cheers kenneth ;)

Link to comment
Share on other sites

Hi,

 

Backup your database first:

 

1. mysqldump -u youruser -p youropassword databasename > databasename.sql

 

2. in mysql prompt:  delete from  customer; delete from orders;

 

3. Great tutorial site: http://www.webdevelopersnotes.com/tutorials/sql/index.php3

Cheers kenneth ;)

 

You will get yourself into a lot of trouble if all you do for removing the appropriate rows, is step 2, it is definitely a lot more involved than that. I've had to convert numerous carts to osCommerce, and 'customers' alone is 3 tables, customers, customers_info and address_book. The same is true for orders, there are a number of tables involved.

 

Peter

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...