
20/10/2007, 15:31
|
| | Fecha de Ingreso: enero-2006
Mensajes: 47
Antigüedad: 19 años, 1 mes Puntos: 0 | |
Re: Este es el codigo que estoy utilizando Este el codigo en php
try{
$coneccion = new PDO("mysql:host=localhost;dbname=pdo","root","root ");
$stmt = $coneccion->prepare("CALL devolver(?)");
$stmt->bindParam(1,$valor,PDO::PARAM_INT,11);
$stmt->execute();
print $valor;
}catch (Exception $exception) {
echo $exception->getMessage();
}
y este es el procedimeinto almacenado de mysql
CREATE PROCEDURE `devolver`(OUT param1 INTEGER(11))
DETERMINISTIC
SQL SECURITY DEFINER
COMMENT ''
BEGIN
SET param1 = 5;
END |