Websnippetz

Get cool snippets on php, css, jQuery, Magento and wordpress

Delete single order in magento using SQL query

Here is the query to delete single order in magento. All we need to do is just replace ‘xxxxxxxxx’ with your order_id and run it in phpMyAdmin. It works fine in Magento 1.4.x and 1.7.x version.

SET @orderId = 'XXXXXXXXX'; #replace this WITH your ORDER NUMBER
SET FOREIGN_KEY_CHECKS = 1;
DELETE FROM sales_flat_order
WHERE increment_id = @orderId;
DELETE FROM sales_flat_quote
WHERE reserved_order_id = @orderId;

karthi s

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: