请看下面的代码:
DELIMITER $$
DROP PROCEDURE `mostPopular`
CREATE PROCEDURE `mostPopular`()
BEGIN
DROP view if exists mostRec;
create view mostRec as select count(*) as ord,course_code from cms.courses_viewed group by course_code;
select course_name from course join mostRec on course.course_code=mostRec.course_code order by ord desc;
END
此代码在 Mysql Workbench 中有效,但在 phpMyadmin 中无效。它打印“ Cannot return a ResultSet in the Given Context in mysql
”。有谁知道为什么会发生这种情况?