mark27uk3 Posted March 1, 2005 Share Posted March 1, 2005 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 More sharing options...
keoga Posted March 1, 2005 Share Posted March 1, 2005 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: <{POST_SNAPBACK}> 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 More sharing options...
peterr Posted March 1, 2005 Share Posted March 1, 2005 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 ;) <{POST_SNAPBACK}> 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.