Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

SQL to set all products priced over xxxx.xx to inactive?


Guest

Recommended Posts

So first backup and then backup ant then once again backup!

Now just to be safe make a copy of your database.

phpmyAdmin

select your database then go to operations tab and  select copy database to ......

you should then have a copy of your db. test any SQL scritp on a copy first.

so use this to set product_status on all products with price over or equal to £299 to 0(turned off)

update
  `products`
set
  `products_status` = 0
WHERE
  `products_price` >= '299';

tested on CE and  MySQL - 10.1.38-MariaDB-cll-lve

 

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...