ietax Posted March 7, 2014 Share Posted March 7, 2014 (edited) Hi, i need tu update some price of my products. How can I do it by MYSQL? EX. all prices of category 1 should be price * 1,35 I use mysql for change description/title... ecc... UPDATE `ps_product_lang` SET `name` = replace(name,"xxxxx","yyyyy") WHERE `ps_product_lang`.`id_lang` =1; but i cannot update price with formula. thanks Edited March 7, 2014 by ietax (see edit history) Link to comment Share on other sites More sharing options...
jpcarlisle Posted March 7, 2014 Share Posted March 7, 2014 Hello, If you are looking to just change the price for all categories of 1 do this: UPDATE ps_product SET price = (place amount here) WHERE id_category_default = 1; The prices are in the ps_product table. I would recommend backing up you database before starting to do mass SQL statement changes. Good luck, Josh Link to comment Share on other sites More sharing options...
ietax Posted March 7, 2014 Author Share Posted March 7, 2014 (edited) Ok, thanks.. solved I used this SQL for update price only on category number 61 UPDATE `ps_product` SET `price` = `price` * 2.5 WHERE `id_category_default` LIKE '5' I generated a HTML/PHP page where i insert category number and "numer" for do it when I need. Edited March 7, 2014 by ietax (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now