What is the SQL code to set all product quantity to 1?
i know it's something like... UPDATE `products` SET `products_quantity` = '1'
Thanks!
What is the SQL code to set all product quantity to 1?
i know it's something like... UPDATE `products` SET `products_quantity` = '1'
Thanks!
The query you posted will work, in general, to set each and every product's price to 1.0000.
For more strict versions of MySQL, since the products_quantity field is a numeric value (not a string), I'd suggest
UPDATE products SET products_quantity = 1;
No quotes around that 1. The query will work in the admin's Tools / Install SQL Patches regardless of the site's DB_PREFIX, but phpMyAdmin requires the DB_PREFIX value (e.g. 'zen_', if set in the site's configure.php files):
UPDATE zen_products SET products_quantity = 1;
Any idea why this isn't working?
UPDATE products SET products_quantity = 1000; WHERE `products`.`master_categories_id` = 58;
Ooooooh right! thank you!