Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How can I quickly update product_quantity field?


tedmcdonald

Recommended Posts

Posted

I need to update the product quantities for all the products on my site.

 

I am using phpMyAdmin, but it's still taking too long to edit individually the product_quantity field for over 300 products.

 

Is there an simple way of increasing the product_quantity number in all 300 products all at once?

 

All help is greatly appreciated.

 

Best Regards, Ted

Posted

In phpmyadmin this should do it:

 

update products set products_quantity=products_quantity+1;

 

to increment all the products by one or if you want to do just a single product then eg.

 

update products set products_quantity=products_quantity+1 where products_id=33;

 

I know this works fine to increment the product quantities, I haven't checked if there is anything else that needs to be done to maintain database integrity but if the database structure is well specified this should be sufficient.

Archived

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

×
×
  • Create New...