Delete test orders in Magento
57 Comments 23rd OCT 2008 | Posted by Tomislav Bilic in Magento

You got a Magento project to develop, you created a Magento theme, you placed initial products and categories and you also placed some test orders to see if Shipping and Payment methods work as expected. Everything seems to be cool and the client wishes to launch the site. You launch it. When you enter the administration for the first time after the launch, you will see all your test orders there. You know those should be deleted. But how?
If you try to delete orders in the backend, you will find out that you can only set the status to “cancelled” and the order is still there. Unfortunately, Magento doesn’t enable us to delete those via administration, so you will not see any “Delete order” button. This can be quite frustrating both to developers and the merchants. People coming from an SAP world find the inability to delete to have some merit but there should be a status that removes the sales count from the reports i.e. sales, inventory, etc.
So, what to do?
You need to go to MySQL admin client and run this query:
SET FOREIGN_KEY_CHECKS=0; TRUNCATE `sales_order`; TRUNCATE `sales_order_datetime`; TRUNCATE `sales_order_decimal`; TRUNCATE `sales_order_entity`; TRUNCATE `sales_order_entity_datetime`; TRUNCATE `sales_order_entity_decimal`; TRUNCATE `sales_order_entity_int`; TRUNCATE `sales_order_entity_text`; TRUNCATE `sales_order_entity_varchar`; TRUNCATE `sales_order_int`; TRUNCATE `sales_order_text`; TRUNCATE `sales_order_varchar`; TRUNCATE `sales_flat_quote`; TRUNCATE `sales_flat_quote_address`; TRUNCATE `sales_flat_quote_address_item`; TRUNCATE `sales_flat_quote_item`; TRUNCATE `sales_flat_quote_item_option`; TRUNCATE `sales_flat_order_item`; TRUNCATE `sendfriend_log`; TRUNCATE `tag`; TRUNCATE `tag_relation`; TRUNCATE `tag_summary`; TRUNCATE `wishlist`; TRUNCATE `log_quote`; TRUNCATE `report_event`; ALTER TABLE `sales_order` AUTO_INCREMENT=1; ALTER TABLE `sales_order_datetime` AUTO_INCREMENT=1; ALTER TABLE `sales_order_decimal` AUTO_INCREMENT=1; ALTER TABLE `sales_order_entity` AUTO_INCREMENT=1; ALTER TABLE `sales_order_entity_datetime` AUTO_INCREMENT=1; ALTER TABLE `sales_order_entity_decimal` AUTO_INCREMENT=1; ALTER TABLE `sales_order_entity_int` AUTO_INCREMENT=1; ALTER TABLE `sales_order_entity_text` AUTO_INCREMENT=1; ALTER TABLE `sales_order_entity_varchar` AUTO_INCREMENT=1; ALTER TABLE `sales_order_int` AUTO_INCREMENT=1; ALTER TABLE `sales_order_text` AUTO_INCREMENT=1; ALTER TABLE `sales_order_varchar` AUTO_INCREMENT=1; ALTER TABLE `sales_flat_quote` AUTO_INCREMENT=1; ALTER TABLE `sales_flat_quote_address` AUTO_INCREMENT=1; ALTER TABLE `sales_flat_quote_address_item` AUTO_INCREMENT=1; ALTER TABLE `sales_flat_quote_item` AUTO_INCREMENT=1; ALTER TABLE `sales_flat_quote_item_option` AUTO_INCREMENT=1; ALTER TABLE `sales_flat_order_item` AUTO_INCREMENT=1; ALTER TABLE `sendfriend_log` AUTO_INCREMENT=1; ALTER TABLE `tag` AUTO_INCREMENT=1; ALTER TABLE `tag_relation` AUTO_INCREMENT=1; ALTER TABLE `tag_summary` AUTO_INCREMENT=1; ALTER TABLE `wishlist` AUTO_INCREMENT=1; ALTER TABLE `log_quote` AUTO_INCREMENT=1; ALTER TABLE `report_event` AUTO_INCREMENT=1; -- reset customers TRUNCATE `customer_address_entity`; TRUNCATE `customer_address_entity_datetime`; TRUNCATE `customer_address_entity_decimal`; TRUNCATE `customer_address_entity_int`; TRUNCATE `customer_address_entity_text`; TRUNCATE `customer_address_entity_varchar`; TRUNCATE `customer_entity`; TRUNCATE `customer_entity_datetime`; TRUNCATE `customer_entity_decimal`; TRUNCATE `customer_entity_int`; TRUNCATE `customer_entity_text`; TRUNCATE `customer_entity_varchar`; TRUNCATE `log_customer`; TRUNCATE `log_visitor`; TRUNCATE `log_visitor_info`; ALTER TABLE `customer_address_entity` AUTO_INCREMENT=1; ALTER TABLE `customer_address_entity_datetime` AUTO_INCREMENT=1; ALTER TABLE `customer_address_entity_decimal` AUTO_INCREMENT=1; ALTER TABLE `customer_address_entity_int` AUTO_INCREMENT=1; ALTER TABLE `customer_address_entity_text` AUTO_INCREMENT=1; ALTER TABLE `customer_address_entity_varchar` AUTO_INCREMENT=1; ALTER TABLE `customer_entity` AUTO_INCREMENT=1; ALTER TABLE `customer_entity_datetime` AUTO_INCREMENT=1; ALTER TABLE `customer_entity_decimal` AUTO_INCREMENT=1; ALTER TABLE `customer_entity_int` AUTO_INCREMENT=1; ALTER TABLE `customer_entity_text` AUTO_INCREMENT=1; ALTER TABLE `customer_entity_varchar` AUTO_INCREMENT=1; ALTER TABLE `log_customer` AUTO_INCREMENT=1; ALTER TABLE `log_visitor` AUTO_INCREMENT=1; ALTER TABLE `log_visitor_info` AUTO_INCREMENT=1; -- Reset all ID counters TRUNCATE `eav_entity_store`; ALTER TABLE `eav_entity_store` AUTO_INCREMENT=1; SET FOREIGN_KEY_CHECKS=1;
After you have it executed, the test orders will not be in the database any more. Keep in mind that this will delete ALL orders, in the database. So, you should execute this queries immediately after launch.
To post code in comments, place your code inside [code] and [/code] tags.


















October 23rd, 2008 at 13:43
Great post.
You save me some time with my future task.
Thanks.
October 24th, 2008 at 13:45
Great post.
Would it be possible to delete specific orders? Say for instance, if your store had been running for a little while with the original test orders still in place and you only found the above snippet now?
Cheers,
Matt
October 24th, 2008 at 13:48
Hello Matthew,
That was the point of this post. It is currently impossible to do it with Magento administration. You would have to go to MySQL client and delete relevant entities manually starting with sales_order* tables.
October 27th, 2008 at 19:10
Hey Tomislav Bilic,
In the Dashboard, if u see Lifetime Sales, this show the value of urs sales yet =//
November 1st, 2008 at 13:50
Works like a charm. Thanks for the post!
Paddy
November 1st, 2008 at 16:32
The one attribute this code doesn’t seem to address is Shopping Cart Reports.
After running this code, if you visit backend and go to REPORTS>SHOPPING CART>PRODUCTS IN CARTS, you will see no items listed, but the counter will still list the number of test orders you’ve placed in carts.
I’d suggest the fix myself, but am unsure which table or attribute controls this value – should just be a matter of adding two lines – one to truncate, and another to auto-increment.
November 11th, 2008 at 23:10
Correct me if I’m wrong, but don’t you want to add these tables too?
SET FOREIGN_KEY_CHECKS=0;
TRUNCATE `sales_order_tax`;
TRUNCATE `sales_flat_quote_shipping_rate`;
TRUNCATE `sales_flat_quote_payment`;
TRUNCATE `log_url_info`;
TRUNCATE `log_url`;
ALTER TABLE `sales_order_tax` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_quote_shipping_rate` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_quote_payment` AUTO_INCREMENT=1;
ALTER TABLE `log_url_info` AUTO_INCREMENT=1;
SET FOREIGN_KEY_CHECKS=1;
November 11th, 2008 at 23:19
Oh, and BTW, don’t worry about the PRODUCTS IN CARTS tally being wrong. It seems to be unrelated.
It looks like the wrong reporting of the total in REPORTS>SHOPPING CART>PRODUCTS IN CARTS is an issue with the current version of Magento (at least as of 1.1.6), unrelated to the above queries. I think they may have grabbed the total from the wrong table(s) in the first place. Someone could test in a fresh install with a bunch of products loaded, but no items ever added to carts.
This was pointed out in the Magento Forums, and from my research in code and DB queries, it seems to be the case.
See:
http://www.magentocommerce.com/bug-tracking/issue?issue=3899
November 17th, 2008 at 2:06
Hey there Tomislav!
Great post here, very appreciated on behalf of the community!
We did a bit further modification by the following:
+ resetting all dashboard data
+ setting prefix’s for the following numbers: orders, invoices, shipments, and credit memo’s
Feel free to check it out here: http://eliasinteractive.com/blog/magento-ecommerce-how-to-reset-all-test-order-information-and-set-unique-prefix-for-orders-invoices-shipments-and-credit-memos/
Thanks again for your contributions!
Lee Taylor / Elias Interactive
December 1st, 2008 at 14:36
Thanks Tomislav!!
It worked perfectly
Cheers!
January 24th, 2009 at 16:08
Hi Tomislav,
Thoroughly useful script. Exactly what I was looking for whilst developing out my Magento shop. A real time saver…
Cheers!
June 3rd, 2009 at 22:27
Is this SQL Query still valid for Magento? new Log_Visitor tables got added in version 1.3.1.1, so I don’t this this query will still do it all 100%, it certainly removes the test orders in 1.3.2.2. Just don’t want it missing anything.
Please take a little look.
Thanks,
Rob.
June 17th, 2009 at 7:44
@Robert: We surely will, just when we manage to catch some free time. Hope you understand. Few days passed since your question and I was wondering if you managed to solve the issue already. If you did, feel free to post the update query to us and we’ll publish it. Thanks.
June 24th, 2009 at 16:34
trouble is that quite often post launch there are multiple test orders created, these then are un deletable
July 10th, 2009 at 2:14
THANKS!
July 14th, 2009 at 14:49
Thanks mate! Works perfect in magento 1.3.2.2!
No error in the reports > products in chart either!
Perfect
August 11th, 2009 at 23:12
I confirm, works great under 1.3.2.2!
thanks so much
August 28th, 2009 at 14:36
Well check this, a total solution for deleting Magento order “Delete Any Order”
https://www.yireo.com/software/delete-any-order
September 1st, 2009 at 6:25
Thanks for the post.
You also might want to truncate the following tables too:
whishlist_item
table that starts with catalogsearch
September 24th, 2009 at 6:44
I don’t want to delete customers from magento. Can I leave the customer reset portion out and be okay?
thanks..
September 25th, 2009 at 20:46
Works perfectly on Magento ver. 1.3.2.3 !
Thanks for this trick
October 12th, 2009 at 14:36
Also just tested on v1.3.2.3 and worked like a charm!
Thanks for this.
October 26th, 2009 at 18:48
Thanks a lot!!!
November 6th, 2009 at 2:09
Did it with version 1.3.2.4 and it worked like a champ! Thanks for the solution.
November 9th, 2009 at 18:45
I comfirm that works with 1.3.2.4, thanks
December 20th, 2009 at 0:43
Magento won’t let you delete orders or do a bunch of other stuff in its misguided attempt be your nanny in helping you to obey various accounting laws in certain countries.
I wish there was a “scofflaw” switch you could se that lets you do this forbidden stuff. Those of us in the United States are stuck with the inconveniences of a superset of every piddling regulation of every country in the EU.
December 23rd, 2009 at 0:22
Like others I was astonished to find this facility not present.
I have php and sql knowledge and feel for those that have mentioned the inability to get around these things. I have made a simple form using the code discussed on this site and it is available for download at http://www.mycreateabook.com.au/magentoReset.zip for all who wants to use it.
The only requirement would be that you need to know your sql database settings that should be available from your website administrator if you do not already know it.
Thanks for the code in the firt place. It saved me heaps of time fishing through to work it out myself. I am still in the process of setting up my site with Magento. It is visible at the moment at http://webstore.mycreateabook.com.au
January 15th, 2010 at 15:03
yes how about this?
”
Matthew Mucklo Says
November 11th, 2008 at 23:10
Correct me if I’m wrong, but don’t you want to add these tables too?
SET FOREIGN_KEY_CHECKS=0;
TRUNCATE `sales_order_tax`;
TRUNCATE `sales_flat_quote_shipping_rate`;
TRUNCATE `sales_flat_quote_payment`;
TRUNCATE `log_url_info`;
TRUNCATE `log_url`;
ALTER TABLE `sales_order_tax` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_quote_shipping_rate` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_quote_payment` AUTO_INCREMENT=1;
ALTER TABLE `log_url_info` AUTO_INCREMENT=1;
SET FOREIGN_KEY_CHECKS=1;
“
January 17th, 2010 at 23:37
Hi Matthew.
If you are referring to my post, it has been included already but I have it at the bottom of the file to keep it separate.
January 20th, 2010 at 17:57
I too am using 1.3.2.4. I tried the reset script and got a “Table Reset Successful” message, however when I return to the dashboard all of the dummy orders are still there. Any ideas what may have gone wrong, and why it did not clear the dummy orders? Thanks.
March 9th, 2010 at 14:54
Very effective query. We had a lot of test data in our database, and we’re lauching into production today. Thanks for the help.
March 9th, 2010 at 16:44
Brilliant, thanks
March 24th, 2010 at 19:36
Absolutely brilliant. Thanks so much for posting this – worked like a charm. Solid gold.
April 3rd, 2010 at 21:40
Brilliant post, thanks.
One point I would like to make though, just for others using this, if you don’t want product tags deleted etc, remove that line before running this in your db.
April 15th, 2010 at 5:52
Brilliant stuff, this worked without flaw on version 1.3.2.4 Thanks.
please could you provide the sql query to delete the top and last 5 search terms?
April 15th, 2010 at 14:23
Is still valid in magento 1.4?
April 16th, 2010 at 4:48
[...] for 1.3.2.4 use http://inchoo.net/ecommerce/magento/delete-test-orders-in-magento/ [...]
April 18th, 2010 at 20:15
Awesome solution. Thanks a lot!
May 4th, 2010 at 16:30
Has anyone tried this with release 1.4.0.1 ?
May 11th, 2010 at 9:34
James,
Yes, I just tried on 1.4.0.1. Worked perfectly!
May 29th, 2010 at 8:14
I delete specific orders like this (cobbed together from magento forums)
first, set collation with this script:
$value)
{
mysql_query(“ALTER TABLE $value COLLATE $db_collate”);
echo $value.’ changed to ‘.$db_collate.’ ‘;
}
}
echo “DB collation changed”;
?>
Then I run this in phpmyAdmin (just change the order ID at the start):
[it does seem to mess with the order ID in the URLs]
## SET FOREIGN_KEY_CHECKS = 1;
## WORKS ON VERSION 1.3.2.3
SET @orderId = ’100000772′;
SET FOREIGN_KEY_CHECKS = 1;
SET @salesFlatQuoteId = (
SELECT entity_id
FROM sales_flat_quote
WHERE reserved_order_id = @orderId
);
SET @salesOrderId = (
SELECT entity_id
FROM sales_order
WHERE increment_id = @orderId
);
CREATE TEMPORARY TABLE del_sales(
id INT AUTO_INCREMENT PRIMARY KEY,
salesId INT(10)
)
COLLATE ‘utf8_unicode_ci’;
CREATE TEMPORARY TABLE del_statusSales(
id INT AUTO_INCREMENT PRIMARY KEY,
salesId INT(10)
)
COLLATE ‘utf8_unicode_ci’;
INSERT INTO del_statusSales (salesId)
SELECT entity_id
FROM sales_order_entity_int
WHERE value = @salesOrderId
AND attribute_id = ANY (
SELECT attribute_id
FROM eav_attribute
WHERE attribute_code = ‘order_id’
)
AND entity_id = ANY (
SELECT entity_id
FROM sales_order_entity
WHERE entity_type_id = ANY (
SELECT entity_type_id
FROM eav_entity_type
WHERE entity_type_code = ‘invoice’
OR entity_type_code = ‘shipment’
OR entity_type_code = ‘creditmemo’
)
);
INSERT INTO del_sales (salesId)
SELECT entity_id
FROM sales_order_entity
WHERE parent_id = ANY (
SELECT salesId
FROM del_statusSales
)
AND entity_type_id = ANY (
SELECT entity_type_id
FROM eav_entity_type
WHERE entity_type_code = ‘invoice_item’
OR entity_type_code = ‘invoice_comment’
OR entity_type_code = ‘shipment_item’
OR entity_type_code = ‘shipment_comment’
OR entity_type_code = ‘shipment_track’
OR entity_type_code = ‘creditmemo_item’
OR entity_type_code = ‘creditmemo_comment’
);
INSERT INTO del_sales (salesId)
SELECT salesId
FROM del_statusSales;
INSERT INTO del_sales (salesId)
SELECT entity_id
FROM sales_order_entity
WHERE parent_id = @salesOrderId;
DELETE FROM sales_order_entity
WHERE entity_id = ANY (
SELECT salesId
FROM del_sales
);
DELETE FROM sales_flat_quote
WHERE reserved_order_id = @orderId;
DELETE FROM sales_flat_order_item
WHERE quote_item_id = @salesFlatQuoteId;
DELETE FROM sales_order
WHERE increment_id = @orderId;
/* drop temp tables */
DROP TEMPORARY TABLE del_sales;
DROP TEMPORARY TABLE del_statusSales;
May 29th, 2010 at 8:21
Let’s try that first one again:
$value)
{
mysql_query(“ALTER TABLE $value COLLATE $db_collate”);
echo $value.’ changed to ‘.$db_collate.’ ‘;
}
}
echo “DB collation changed”;
?>
June 13th, 2010 at 7:05
great job. thanks
June 20th, 2010 at 13:22
Does not work anymore on version 1.4.1.0. Table structure has changed after upgrading as it seems..
table sales_order is changed to sales_flat_order and a few others. This trick used to work on my previous Magento version.
June 26th, 2010 at 7:57
Is there any way for doing this in magento 1.4.1? Thanks ~
June 30th, 2010 at 12:03
Thanks for the great tip!
I’ve read some comments and I saw some other sites that linked to this URL. It should work with the version I have installed (v1.3.2.4), but I have something strange going on..
I executed the SQL and i clearly see that the tables are actually empty.
But all the data (the orders, ..) are still there. Really weird.
I see an order with orderID 100000031, I do a search in phpmyadmin for %100000031% in all the tables and I cannot find anything.
- I refreshed the cache through the admin and still the orders are there.
- I removed /var/cache and /var/sessions through ftp and still the orders are there.
Does anyone have a clue what is going on?
I’m working on the correct database
July 2nd, 2010 at 14:25
This is not working on Recent Magento v1.4.1
Help me~~~~
July 6th, 2010 at 7:58
Hi, Your post is awesome. works great. I am using it and works like a charm. Thanks for that man.
Carry on.
July 8th, 2010 at 8:03
Because Magento uses foreign keys, it’s enaugh to run truncate on 2-3 tables `sales_flat_order` , `sales_flat_quote` (for 1.4.1.0 didn’t test to see if there are any but tables as sales_flat_order_… will also be truncated) also truncate will set your increment id to 1
July 14th, 2010 at 23:38
[...] Script Source [...]
July 26th, 2010 at 7:57
you can Easily Delete orders and manage all orders via Order book extension
check this out
http://www.magentocommerce.com/magento-connect/Modulesoft+Solutions/extension/4047/mspl_orderbook
August 3rd, 2010 at 6:28
Unfortunately it doesn’t work in 1.4.1.1
It’s looking for ‘sales_order’ which doesn’t exist.
August 9th, 2010 at 19:32
found this one on a german site…… for magento 1.4.1.x
i am going to try this on my test magento shop, will let you know if it worked….
– Reset Magento TEST Data
SET FOREIGN_KEY_CHECKS=0;
– reset dashboard search queries
TRUNCATE `catalogsearch_query`;
ALTER TABLE `catalogsearch_query` AUTO_INCREMENT=1;
– reset sales order info
TRUNCATE `sales_flat_creditmemo`;
TRUNCATE `sales_flat_creditmemo_comment`;
TRUNCATE `sales_flat_creditmemo_grid`;
TRUNCATE `sales_flat_creditmemo_item`;
TRUNCATE `sales_flat_invoice`;
TRUNCATE `sales_flat_invoice_comment`;
TRUNCATE `sales_flat_invoice_grid`;
TRUNCATE `sales_flat_invoice_item`;
TRUNCATE `sales_flat_order`;
TRUNCATE `sales_flat_order_address`;
TRUNCATE `sales_flat_order_grid`;
TRUNCATE `sales_flat_order_item`;
TRUNCATE `sales_flat_order_payment`;
TRUNCATE `sales_flat_order_status_history`;
TRUNCATE `sales_flat_quote`;
TRUNCATE `sales_flat_quote_address`;
TRUNCATE `sales_flat_quote_address_item`;
TRUNCATE `sales_flat_quote_item`;
TRUNCATE `sales_flat_quote_item_option`;
TRUNCATE `sales_flat_quote_payment`;
TRUNCATE `sales_flat_quote_shipping_rate`;
TRUNCATE `sales_flat_shipment`;
TRUNCATE `sales_flat_shipment_comment`;
TRUNCATE `sales_flat_shipment_grid`;
TRUNCATE `sales_flat_shipment_item`;
TRUNCATE `sales_flat_shipment_track`;
TRUNCATE `sales_invoiced_aggregated`;
TRUNCATE `sales_invoiced_aggregated_order`;
TRUNCATE `sales_order_aggregated_created`;
TRUNCATE `sendfriend_log`;
TRUNCATE `tag`;
TRUNCATE `tag_relation`;
TRUNCATE `tag_summary`;
TRUNCATE `wishlist`;
TRUNCATE `log_quote`;
TRUNCATE `report_event`;
ALTER TABLE `sales_flat_creditmemo` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_creditmemo_comment` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_creditmemo_grid` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_creditmemo_item` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_invoice` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_invoice_comment` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_invoice_grid` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_invoice_item` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_order` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_order_address` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_order_grid` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_order_item` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_order_payment` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_order_status_history` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_quote` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_quote_address` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_quote_address_item` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_quote_item` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_quote_item_option` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_quote_payment` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_quote_shipping_rate` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_shipment` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_shipment_comment` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_shipment_grid` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_shipment_item` AUTO_INCREMENT=1;
ALTER TABLE `sales_flat_shipment_track` AUTO_INCREMENT=1;
ALTER TABLE `sales_invoiced_aggregated` AUTO_INCREMENT=1;
ALTER TABLE `sales_invoiced_aggregated_order` AUTO_INCREMENT=1;
ALTER TABLE `sales_order_aggregated_created` AUTO_INCREMENT=1;
ALTER TABLE `sendfriend_log` AUTO_INCREMENT=1;
ALTER TABLE `tag` AUTO_INCREMENT=1;
ALTER TABLE `tag_relation` AUTO_INCREMENT=1;
ALTER TABLE `tag_summary` AUTO_INCREMENT=1;
ALTER TABLE `wishlist` AUTO_INCREMENT=1;
ALTER TABLE `log_quote` AUTO_INCREMENT=1;
ALTER TABLE `report_event` AUTO_INCREMENT=1;
SET FOREIGN_KEY_CHECKS=1;
August 11th, 2010 at 0:01
This last one worked for me in Magento 1.4.1.1
Just had to delete the comments.
Thanks !! Jordi Bos
August 19th, 2010 at 6:02
oh,it show error on my magento 1.4.1.0.
here is error:
Error
SQL query:
– RESET dashboard search queries TRUNCATE `catalogsearch_query` ;
MySQL said: Documentation
#1064 – You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘– reset dashboard search queries
TRUNCATE `catalogsearch_query`’ at line 1
August 20th, 2010 at 12:51
Probably wont work with magento 1.4.1.0
I tried it with 1.4.1.1 That WORKS FINE!
@ zdhkw2010 –> check if there is a table called catalogsearch_query
if there isn’t then remove this line from your query string. Maybe that will help…
Greets..
Jordi Bos
August 23rd, 2010 at 4:59
Works fine for me on 1.4.1.0, just remove the comment lines starting with “-” before running the query~
Thanks to Jordi Bos.