будет ли эта процедура вычислять число строк? как я называю эту процедуру с php?

test1 – это процедура, которая подсчитывает строки таблицы, которые создаются после передачи двух переменных v_col1 и v_col2. когда я запускаю это в MySQL, он показывает

«MySQL возвратил пустой набор результатов (то есть нулевые строки). (Запрос занял 0,0020 сек)»

однако я не могу назвать это из php.

Delimiter $$ create procedure test1() BEGIN BLOCK1: begin declare v_col1 int(10); declare no_more_rows1 boolean default FALSE; declare cursor1 cursor for select content_id from topic_list where topic_id=1; declare continue handler for not found set no_more_rows1 = TRUE; open cursor1; LOOP1: loop fetch cursor1 into v_col1; if no_more_rows1 then close cursor1; leave LOOP1; end if; BLOCK2: begin declare v_col2 int(10); declare no_more_rows2 boolean default FALSE; declare cursor2 cursor for select content_id from content_upvotes where u_id_upvoter = 1; declare continue handler for not found set no_more_rows2 = TRUE; open cursor2; LOOP2: loop fetch cursor2 into v_col2; if no_more_rows2 then close cursor2; leave LOOP2; end if; select count(*) as mynum from (SELECT *from content_upvotes where content_id=v_col1) t1 join (select u_id_upvoter as user_id from content_upvotes where content_id= v_col2) t2 on t1.u_id_upvoter=t2.user_id ; end loop LOOP2; end BLOCK2; end loop LOOP1; end BLOCK1; end $$ DELIMITER ; 

пожалуйста, помогите мне здесь.