<%
If not (rstHouse.bof and rstHouse.eof) then
iRecordCount=rstHouse.recordCount
j=1
do while not rstHouse.eof
response.write "<tr bgcolor='#FFFFFF' height='22'>"
response.write "<td align='center' nowrap>"
response.write trim(rstHouse("room_type"))
response.write "</td>"
response.write "<td align='center'>"
response.write trim(PriceFormat(rstHouse("fangjia")))
response.write "<input type=""hidden"" name=""fangjia"" value='"&trim(PriceFormat(rstHouse("fangjia")))&"'>"
response.write "</td>"
response.write "<td align='center' width='100' style='TABLE-LAYOUT: fixed;WORD-BREAK: break-all'>"
response.write trim(rstHouse("ourprice"))
response.write "</td>"
response.write "<td align='center'>"
response.write roomre(trim(rstHouse("available")))
response.write "</td>"
response.write "<td align='center'>"
if session("hzlUserID")<>"" then
response.write "<input type='button' value='预订' onclick=javascript:goSubmit('" & rstHouse("room_type") & "','" & trim(PriceFormat(rstHouse("fangjia"))) & "')>"
else
response.write "<input type='button' value='预订' onclick=javascript:toSubmit('" & rstHouse("room_type") & "','" & trim(PriceFormat(rstHouse("fangjia"))) & "')>"
end if
response.write "</td>"
response.write "</tr>"
rstHouse.movenext
j=j+1
loop
end if
%>
这是源代码!生成的HTML有好几行错误,可见:http://www.gzmrsl.com/hotelDetailSzx.asp?ID=4287
如果数据内容只有一条,就不会出错,奇怪,怎么解决啊!~高手请帮忙!!!!多谢
如何只读取数据库某字段的第一行(条)内容呢?