php怎么调用带out参数的存储过程
程序员文章站
2024-01-25 12:51:40
...
php如何调用带out参数的存储过程?
如
存储过程:
CREATE check_user(vUserName VARCHAR(20),vUserPWD VARCHAR(40),out vUserCount int )
begin
select COUNT(*) into vUserCount from user where user_name=vUserName and user_passward=vUserPWD;
end;
在php文件中怎么调用?
------解决方案--------------------
CREATE check_user(vUserName VARCHAR(20),vUserPWD VARCHAR(40),out vUserCount int )
begin
select COUNT(*) into vUserCount from user where user_name=vUserName and user_passward=vUserPWD;
end;
送出查询( "CALL check_user( 'user ', 'pass ',@vUserCount) ");
送出查询( "SELECT @vUserCount ");
$row = .....-> fetch_array();
print_r($row)
如
存储过程:
CREATE check_user(vUserName VARCHAR(20),vUserPWD VARCHAR(40),out vUserCount int )
begin
select COUNT(*) into vUserCount from user where user_name=vUserName and user_passward=vUserPWD;
end;
在php文件中怎么调用?
------解决方案--------------------
CREATE check_user(vUserName VARCHAR(20),vUserPWD VARCHAR(40),out vUserCount int )
begin
select COUNT(*) into vUserCount from user where user_name=vUserName and user_passward=vUserPWD;
end;
送出查询( "CALL check_user( 'user ', 'pass ',@vUserCount) ");
送出查询( "SELECT @vUserCount ");
$row = .....-> fetch_array();
print_r($row)
相关文章
相关视频
上一篇: PHP学习时间完整表