一点对数据库查询语言的疑惑,望解答。
单表查询,将 <%=rs_down( "select SmallClassName ")%> 改成 <%=rs_down( "select SmallClass_down.SmallClassName ")%> ,数据却不能显示,请问是怎么回事?
=========================================================================
整段代码如下:
<%
set rs_down=server.createobject( "adodb.recordset ")
sqltext4= "select SmallClass_down.* FROM SmallClass_down "
rs_down.open sqltext4,conn,1,1
%>
<table width= "100% " height= "22 " border= "0 " cellpadding= "0 " cellspacing= "1 ">
<tr>
<%i=1
do while not rs_down.eof%>
<td width= "150 " height= "17 "> <img src= "../Img/arrow_6.gif " width= "11 " height= "11 ">
<%=rs_down( "select SmallClass_down.SmallClassName ")%>
//就是上面这段代码,改变前是可以正常显示。改后无法显示数据库的信息。
<%if i mod 4=0 then '四个显示一行
response.write ( " </TR > <tr> <td background= '../Img/arrow_6.gif ' height=1> </td> <td background= '../Img/arrow_6.gif ' height=1> </td> </tr> <TR> ")
end if%>
<%rs_down.movenext
loop
rs_down.close %>
========================================================================
------解决方案--------------------rs_down( "select SmallClass_down.SmallClassName ")
这里边的字段名错误