cezar99 Posted March 11, 2010 Share Posted March 11, 2010 Hi, below i have lines from sgl file which i want change price: INSERT INTO `products` VALUES ('1901', null, '0', '853551', '853561.jpg', null, '445.0820', '2008-03-03 00:17:36', '2009-07-07 13:45:38', null, '0.00', '1', '2', '9', '0'); INSERT INTO `products` VALUES ('1901', null, '0', '853671', '853651.jpg', null, '445.0820', '2008-03-03 00:17:36', '2009-07-07 13:45:38', null, '0.00', '1', '2', '9', '0'); How i can mass change for 2000 products ? i should do like this?: UPDATE INSERT INTO `products` VALUES ('1901', null, '0', '85331', '85331.jpg', null, '333.0820', '2008-03-03 00:17:36', '2009-07-07 13:45:38', null, '0.00', '1', '2', '9', '0'); Link to comment Share on other sites More sharing options...
Hotclutch Posted March 11, 2010 Share Posted March 11, 2010 Use the Easypopulate or Price updater scripts in Add-ons. http://addons.oscommerce.com/category?search=price+updater Link to comment Share on other sites More sharing options...
MrPhil Posted March 11, 2010 Share Posted March 11, 2010 Hi, below i have lines from sgl file which i want change price: Are these existing products that you want to change? Don't use INSERT -- that adds a new record and a new product, and you'll probably get into trouble because of the duplicate key (duplicate product_id). As suggested above, using a spreadsheet CSV file format such as Easy Populate might make mass updates easier. If you want to use an .sql file (direct database modification), you would use the UPDATE command: UPDATE `products` set price = '<<new price>>' WHERE product_id='1901'; or something similar to that. You need to know the field name you're changing, and the product_id of each product. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.