江湖救急阿,一个很简单的asp问题,怎么搞都搞不明白,谢谢大家帮我看下哪里错了
代码如下:(数据库连接那段就不贴了)
<table width= "750 " border= "0 " cellpadding= "3 " cellspacing= "1 " bgcolor= "#CCCCCC ">
<tr align= "center " bgcolor= "#CCCCCC ">
<td width= "145 "> 大类 </td>
<td width= "145 "> 小类 </td>
<td width= "100 "> 型号 </td>
<td width= "210 " colspan= "3 "> </td>
<td width= "50 "> 热门 </td>
<td width= "100 "> 发布时间 </td>
</tr>
<%
Do while not rs.EOF
SQLcmd1 = "Select first_category from second_category where second_category= ' "&rs( "second_category ")& " ' "
Set rs1 = newconn.Execute(SQLcmd1)
%>
<tr bgcolor= "#FFFFFF ">
<td> <%=rs1(0)%> </td>
<td> <%=rs( "second_category ")%> </td>
<td> <a href= "# "> <%=rs( "product ")%> </a> </td>
<td width= "70 " align= "center "> <input type= "submit " name= "Submit " value= "修改 "> </td>
<td width= "70 " align= "center "> <input type= "submit " name= "Submit2 " value= "删除 "> </td>
<td width= "70 " align= "center ">
<%If trim(rs( "online "))= "y " Then%>
<input type= "submit " name= "Submit22 " value= "隐藏 ">
<%Else%>
<input type= "submit " name= "Submit22 " value= "显示 ">
<%End If%>
</td>
<td> <%=rs( "hpro ")%> </td>
<td> <%=rs( "issuetime ")%> </td>
</tr>
<%rs.MoveNext%>
<%Loop%>
</table>
问题来了,
前面的字段从数据库读取都很正常,可偏偏最后一个 <%=rs( "issuetime ")%> 怎么也读不出来。我检查过无数遍,数据库里字段也正确,也有值。
后来我将 <%=rs( "hpro ")%> 换成 <%=rs( "issuetime ")%> 然后连着两行 <%=rs( "issuetime ")%> 都正确显示!
郁闷死我了。向各位大虾求教了!!!
------解决方案--------------------hpro和issuetime在数据库里的顺序是怎么样的啊,是不是数据库游标的原因