|
发表于 2011-7-27 15:32:10
|
显示全部楼层
例如:PHP复制代码
create procedure hhy (in yumail varchar (20),out _s int ,out _uid int )
begin
if exists (select * from user where umail = yumail ) then
set _s = 1;
select uid into _uid from user where umail = yumail ;
else
set _s = 0;
end if;
end
复制代码
PHP中使用
PHP复制代码
$this -> db -> query(“call hhy('test@test.com',@_s,@_uid);”);
$this -> db -> query(“select @_s,@_uid;”);
复制代码
|
|