response.write "<table border=1 cellspacing=0 cellpadding=0>"
response.write"<th>参加考试的单位</th> "
response.write" "
response.write"<th>人数<th> "
'response.write"<br>"
sql3="select banji,count(banji) as num2 from tbuser ,tbscore where tbscore.kcid="&kcid&" and tbscore.paperno="&paperno&" and tbuser.username=tbscore.username group by banji"
Set rs3=server.CreateObject("adodb.recordset")
rs3.open sql3,conn,3,1
while not rs3.eof
response.write "<tr><td align=center>"
response.write rs3("banji")
response.write "</td>"
'response.write" "
response.write "<td align=center>"
response.write rs3("num2")
response.write "</td></tr>"
'response.write"<br>"
rs3.movenext
wend
rs3.close
'response.write"<hr>"
response.write "<table border=1 cellspacing=0 cellpadding=0 align=left>"
response.write"<th>已经参加考试单位</th>"
response.write" "
response.write"<th>人数</th> "
'response.write"<br>"
sql4="select banji,count(banji) as num1 from tbuser ,tbscore where tbscore.kcid="&kcid&" and tbscore.paperno="&paperno&" and tbscore.isexam=1 and tbuser.username=tbscore.username group by banji"
Set rs4=server.CreateObject("adodb.recordset")
rs4.open sql4,conn,3,1
while not rs4.eof
response.write "<tr><td align=center>"
response.write rs4("banji")
response.write "</td>"
'response.write" "
response.write "<td align=center>"
response.write rs4("num1")
response.write "</td></tr>"
'response.write"<br>"
rs4.movenext
wend
代码如上,得到结果如图所示
,怎样写才能得到下面这种格式呢?
简单说就是让这两个表格并列排列。
[ 本帖最后由 jingjing316 于 2010-1-20 10:38 编辑 ]
response.write"<th>参加考试的单位</th> "
response.write" "
response.write"<th>人数<th> "
'response.write"<br>"
sql3="select banji,count(banji) as num2 from tbuser ,tbscore where tbscore.kcid="&kcid&" and tbscore.paperno="&paperno&" and tbuser.username=tbscore.username group by banji"
Set rs3=server.CreateObject("adodb.recordset")
rs3.open sql3,conn,3,1
while not rs3.eof
response.write "<tr><td align=center>"
response.write rs3("banji")
response.write "</td>"
'response.write" "
response.write "<td align=center>"
response.write rs3("num2")
response.write "</td></tr>"
'response.write"<br>"
rs3.movenext
wend
rs3.close
'response.write"<hr>"
response.write "<table border=1 cellspacing=0 cellpadding=0 align=left>"
response.write"<th>已经参加考试单位</th>"
response.write" "
response.write"<th>人数</th> "
'response.write"<br>"
sql4="select banji,count(banji) as num1 from tbuser ,tbscore where tbscore.kcid="&kcid&" and tbscore.paperno="&paperno&" and tbscore.isexam=1 and tbuser.username=tbscore.username group by banji"
Set rs4=server.CreateObject("adodb.recordset")
rs4.open sql4,conn,3,1
while not rs4.eof
response.write "<tr><td align=center>"
response.write rs4("banji")
response.write "</td>"
'response.write" "
response.write "<td align=center>"
response.write rs4("num1")
response.write "</td></tr>"
'response.write"<br>"
rs4.movenext
wend
代码如上,得到结果如图所示
简单说就是让这两个表格并列排列。
[ 本帖最后由 jingjing316 于 2010-1-20 10:38 编辑 ]