页面传值, int all;//总题数 int easy;//简单的个数 int diff;//难的个数 然后去数据库里随机去,符合要求的,然后去那些个数的。 用储存过程就行
create proc [dbo].[exam] ( @easy int, @diff int ) as begin select top @easy * from 表exam where nandu='easy'; select top @diff * from 表exam where nandu='diff'; end关于数据你想怎么处理就怎么处理? 合到一起,或是分开输出都行!
int easy;//简单的个数
int diff;//难的个数
然后去数据库里随机去,符合要求的,然后去那些个数的。
用储存过程就行
create proc [dbo].[exam]
(
@easy int,
@diff int
)
as
begin
select top @easy * from 表exam where nandu='easy';
select top @diff * from 表exam where nandu='diff';
end关于数据你想怎么处理就怎么处理?
合到一起,或是分开输出都行!
这个值是用来表题号的!