The code brings the corresponding parameters and does not show any error or exception, I have no idea why it does not perform what is programmed in the stored procedure, help!
This is the stored procedure in MySQL:
DELIMITER //
DROP PROCEDURE IF EXISTS prueba.CAMBIA_A_ACTIVO //
CREATE PROCEDURE CAMBIA_A_ACTIVO
(
IN _email VARCHAR(45),
IN _nombre_grupo VARCHAR(80)
)
BEGIN
UPDATE INTEGRATES_GRUPOS SET activo = 1
WHERE nombre_grupo = _nombre_grupo
AND email = _email;
END; //
And this is the php code:
<?php
require_once('connection.php');
class CAMBIA_A_ACTIVO
{
public function __construct($email, $nombre_grupo)
{
try
{
$mysql = new connection();
$conexion = $mysql -> get_connection();
$datos = array("email" => "$email", "nombre_grupo" => "$nombre_grupo");
$statement = $conexion->prepare("CALL CAMBIA_A_ACTIVO(?,?)");
$statement -> bind_param("ss", $datos["email"], $datos["nombre_grupo"]);
$statement -> execute();
$statement -> close();
$conexion -> close();
} catch (Exception $e)
{echo $e->getMessage();}
}
}
?>