过程编译成功 但是在CALL P1()时 屏幕白了 没有反应怎么回事?
为了测试我将过程修改 后 编译成功 但是在CALL P1()时 屏幕白了 没有反应 怎么回事?
CREATE PROCEDURE p1()
BEGIN
DECLARE m_tid varchar(200);
DECLARE m_title varchar(200);
DECLARE m_content varchar(200);
DECLARE hot_id varchar(200);
DECLARE num_id int;
DECLARE cur_title cursor for select tid,title from t_maps_hot where title not in (select com_name from t_yp_thread);
DECLARE continue handler for not found
set m_content='|0|';
open cur_title;
loop
fetch cur_title into m_tid,m_title;
begin
select count(*) into num_id from t_yp_thread where com_name=m_title;
if num_id=0 then
SET m_content=concat('|',m_tid,'|');
insert into t_yp_thread_COPY(maps_hot_id,com_name,im) value
(m_content,m_title,m_title);
end if;
end;
end loop;
close cur_title;
END$$