php怎么调用带out参数的存储过程
程序员文章站
2022-06-16 19:18:15
...
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留言板显示不了用户解决办法
下一篇: mysql联合查询视图实现方法