Devo dire di stamparmi la variabile prezzo solo quando è presente nel db e credo di aver bisogno di un ciclo for.

Qualcuno mi dice come?

SEGUE CODICE:

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<%
function getMese(ByVal mese)
if not isNumeric(mese) then exit function
getMese=arrMesi(mese-1)
end function

function giorniMese(mese,anno)
dim giorni
Select Case cint(mese)
Case 1,3,5,7,8,10,12:
giorni = 31
Case 4,6,9,11:
giorni = 30
Case 2:
if ((cint(anno) mod 4 = 0 and _
cint(anno) mod 100 <> 0) _
or ( cint(anno) mod 400 = 0) ) then
giorni = 29
else
giorni = 28
end if
End Select
giorniMese = giorni
end function

arrMesi=Array("Gennaio","Febbraio","Marzo","Aprile ","Maggio","Giugno","Luglio","Agosto","Settembre", "Ottobre","Novembre","Dicembre")


%>
</head>

<body>
<%
dim mese, settimana, prezzo,rif
mese= Request.QueryString("mese")
settimana = Request.QueryString("settimana")
prezzo = Request.QueryString("prezzo")
rif = Request.QueryString("rif")


Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "provider=microsoft.jet.oledb.4.0; data source="& Server.MapPath("/offerte/offerte.mdb")
Set Rs = Server.CreateObject("ADODB.Recordset")
sql =" select * from disponibilita "
Rs.Open sql, Conn, 1, 3
%>

<table width="450" border="0" cellpadding="0" cellspacing="0">
<%


While NOT rs.EOF

mese=month(date())
for i=mese to 12

Response.Write" <tr><td>" & getMese(i) & "</td>"
primo=datePart("W","01/" & i & "/" & year(date()))
if primo=7 then
start=1
else
start=1+(7-primo)
end if
nGiorni=giorniMese(i,year(date()))
%>

<%
for y=start to nGiorni
Response.Write"<td>" & y & "</td> <td>" & Rs("prezzo") & "</td>"
y=y+6
next
Response.Write"</tr>"
next
%>
<%
rs.MoveNext
Wend
%>

</table>
<%
rs.close
set rs = nothing
conn.close
set conn = nothing
%>


</table>
</body>
</html>