我做了一个查询,从数据库中检索项目列表:
CREATE PROCEDURE dbo.GetSubjects(@DayComing varchar(10) , @UserId varchar(3))
AS
IF EXISTS(
SELECT Std_ID
FROM Student
WHERE Std_ID = @UserID)
BEGIN
SELECT TimeTable.Ttb_Subject
FROM Student INNER JOIN
Class ON Student.Std_Class = Class.Cls_ID INNER JOIN
TimeTable ON Class.Cls_ID = TimeTable.Ttb_Class
WHERE (TimeTable.Ttb_WeekDay = @DayComing) AND (Student.Std_ID = @UserID)
END
ELSE BEGIN
SELECT TimeTable.Ttb_Subject, TimeTable.Ttb_Class
FROM Teacher INNER JOIN
TimeTable ON Teacher.Tch_ID = TimeTable.Ttb_Teacher
WHERE (TimeTable.Ttb_WeekDay = @DayComing)
END
现在我想在 asp 页面上显示 m,但我不知道该怎么做。你知道任何可以帮助我的教程吗?
谢谢。