Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

clearing order comments


Guest

Recommended Posts

Posted

is it possible to clear the orders_status_history table for orders that are old? (say, 6+ months)

this could free up a large amount of space on databases... as once these orders become so old there's really no use to continue storing comments.

Posted

I just tested this, and it seemed to work for me. Try this from phpMyAdmin (backup first!):

 

delete from orders_status_history where date_added < '2003-12-16 12:00:00'

 

obviously you'd want to adjust the date for your purposes.

 

-jared

Posted

do you know why this command gets errors and doesn't do it's job (i run it in phpmyadmin):

TRUNCATE TABLE `holding_orders`

TRUNCATE TABLE `holding_orders_products`

TRUNCATE TABLE `holding_orders_status_history`

TRUNCATE TABLE `holding_orders_total`

 

 

i just want to empty all of these tables, as they're used to log paypal orders for the lazy people who don't return to the site after paying. once i go through the orders and process them i would like to empty these tables to preserve space (gets filled up often)

 

it would actually be ideal to be able to click a button on the held orders page to empty these tables... how could i do this?

Posted

try putting semicolons after each individual statement, or running each command one at a time.

 

-jared

Posted

thank you, this worked:

TRUNCATE TABLE `holding_orders`;

TRUNCATE TABLE `holding_orders_products`;

TRUNCATE TABLE `holding_orders_status_history`;

TRUNCATE TABLE `holding_orders_total`;

:)

Archived

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

×
×
  • Create New...