Академический Документы
Профессиональный Документы
Культура Документы
call avg_sal(@out);
select @out;
Calling a Stored Procedure from PHP
$dbms = 'mysql';
//Replace the below connection parameters to fit your
environment
$host = '192.168.1.8';
$db = 'hris'; $user = 'tr';
$pass = 'mypass';
$dsn = "$dbms:host=$host;dbname=$db";
$cn=new PDO($dsn, $user, $pass);
$q=$cn->exec('call avg_sal(@out)');
$res=$cn->query('select @out')->fetchAll();
print_r($res);