Jump to content

[SOLVED] How to Save Query Value into variable?


arkanimus

Recommended Posts

Solved:

 

in the controller:

 

$id_cart = $this->context->cart->id;   


//SE CONSULTA EN LA BD LA CANTIDAD DE CAJAS


$sql = 'SELECT cantcajas FROM `'._DB_PREFIX_.'cart`
where `id_cart` = '.$id_cart.' ';   


// LA CANTIDAD SE ASIGNA A $CANTIDAD
$cantidad = Db::getInstance()->getValue($sql);
Link to comment
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...