1
문제는 mysql 프로 시저에서 발생합니다. mysql 프로 시저 내에서 업데이트 쿼리를 실행하고 싶습니다. 프로 시저를 작성하고 오류없이 호출했습니다. 하지만 문제는 프로 시저 내부의 업데이트 쿼리가 실행되지 않는다는 것입니다.mysql 저장 프로 시저 + 업데이트 쿼리
delimiter $$
create procedure update_member_status(IN new_mem_id int,IN mem_count int)
begin
declare tot_ref_count,mem_ref_id int default 0;
select ref_id into mem_ref_id
from ccf_user
where user_id=new_mem_id;
select ref_count into tot_ref_count
from ccf_user
where user_id=mem_ref_id;
if tot_ref_count = mem_count then
update ccf_user
set status='permanent'
where user_id=mem_ref_id;
else
update ccf_user
set status='*****'
where user_id=mem_ref_id;
end if;
end
$$
는 다음 나는 프로 시저 호출이 있습니다 - 전화 update_member_status (25,6)
내가 절차 내에서 업데이트 쿼리 실행하려는
난에이 절차를 다시 작성에서 시작할 것