syntaxed Posted August 13, 2013 Share Posted August 13, 2013 (edited) Hi. I am trying to set up shipping cost per item based on weight and I'm still new with SQL. 1. How can I update all the weight of each item in my store to 1 using SQL query? 2. How can I set the default weight of new item as 1? I tried the following query but it gives the error below. Currently running the 1.5.4.1 prestashop update 'ps_product' set weight=1 The error: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''ps_product' set weight=1' at line 1 Edited August 14, 2013 by syntaxed (see edit history) 1 Link to comment Share on other sites More sharing options...
PascalVG Posted August 14, 2013 Share Posted August 14, 2013 He doesn't like your type of quotes around ps_product. Use ` instead of ' Try copy this: UPDATE `ps_product` SET weight= 1 My $0.02, pascal 1 Link to comment Share on other sites More sharing options...
syntaxed Posted August 14, 2013 Author Share Posted August 14, 2013 He doesn't like your type of quotes around ps_product. Use ` instead of ' Try copy this: UPDATE `ps_product` SET weight= 1 My $0.02, pascal Thanks! that works great. I'm sorry, but I have another silly question. How do I even type that type of quote on my keyboard? Link to comment Share on other sites More sharing options...
vekia Posted August 14, 2013 Share Posted August 14, 2013 i suppose that instead ` you can use simple apostrophe ' 1 Link to comment Share on other sites More sharing options...
syntaxed Posted August 14, 2013 Author Share Posted August 14, 2013 seriously, I don't know how you guys get that different type of quotes. I only manage to get just ' so far. I'll look more into this. Thanks Link to comment Share on other sites More sharing options...
PascalVG Posted August 14, 2013 Share Posted August 14, 2013 Om my keyboard it's top row, all the way left, together with ~ Link to comment Share on other sites More sharing options...
syntaxed Posted August 14, 2013 Author Share Posted August 14, 2013 Om my keyboard it's top row, all the way left, together with ~ ah! now I see it. blimey. Thanks! Link to comment Share on other sites More sharing options...
thewordsmith Posted January 25, 2014 Share Posted January 25, 2014 (edited) private function _postProcess(){ // Saving new configurations if(Configuration::updateValue('PS_SHIPPING_METHOD', Tools::getValue('PS_SHIPPING_METHOD'))) } Some thing like that. Edited January 25, 2014 by thewordsmith (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