您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

php怎么调用带out参数的存储过程

2024/3/5 4:20:42发布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)
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product