Jump to content

Error en consulta Update

Recommended Posts

Tengo el codigo siguiente que me hace un descuento del total a pagar, pero no me modifica  nada. Esta correcto para modificar un campo de una tabla o cual es la sentencia correcta?

por favor me ayudan 

public function hookactionUpdateQuantity($params){

        $totalpagar= $this->context->cart->getOrderTotal();
         $idmax = 'SELECT max(id_order) FROM '._DB_PREFIX_.'orders';
        $residmax = Db::getInstance()->getValue($idmax);


   Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'orders` SET `total_discounts`= '.$rpagar. 'WHERE `id_order`='.$residmax);




Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More