作者:手机用户2502895961 | 来源:互联网 | 2018-07-17 04:04
pdo 调用mysql 存储过程
$stmt = $dbh->prepare("CALL test(:bb)");
$aa = '';
$stmt->bindParam(':bb', $aa, PDO::PARAM_STR|PDO::PARAM_INPUT_OUTPUT, 4000);
var_dump($stmt->execute());
var_dump($aa);
var_dump($stmt->fetchAll(PDO::FETCH_ASSOC));
$stmt = $dbh->prepare("select * from userinfo where u_id=:id");
$aa = 1;
$stmt->bindParam(':id', $aa, PDO::PARAM_STR|PDO::PARAM_INPUT_OUTPUT, 4000);
var_dump($stmt->execute());
var_dump($stmt->fetchAll(PDO::FETCH_ASSOC));