Cursorfetch: The number of variables declared in the INTO list must match that of selected columns.
el cursor es este
Código PHP:
declare cursorAlumno cursor for
select @idAlumno from ec_Alumno
open cursorAlumno
fetch next from cursorAlumno into @idAlumno
while @@fetch_status = 0
begin
declare cursorCursos cursor for
select @idCurso,@idAlumno from ec_Curso_Alumno
fetch next from cursorAlumno into @idCurso,@idAlumno
while @@fetch_status = 0
begin
WHILE (@cupoInscritos <= @cupoEsperado)
begin
set @cupoInscritos = + @cupoInscritos + '1'
EXEC [ec_up_Curso_Alumno_agregar]@idCurso,@idAlumno,@idCursoAlumno
,@noError OUTPUT ,@mensaje OUTPUT
END
-- select @@fetch_status
END
close cursorCursos
deallocate cursorCursos
end
close cursorAlumno
deallocate cursorAlumno