Ho questo codice che mi stampa un calendario con un prezzo riferito al giorno.
Gia dico che se il prezzo è 0 di scrvermi un td di un colore.
Ora devo impostare questa if: "se il db non è ancora scritto, non stamparmi il calendario":
CODICE Calendario:
<%
'prezzo= rs("prezzo")
mese=month(oggi)
for i=mese to 12
Response.Write" <tr onmouseover=""style.backgroundColor='#ffffff'"" onmouseout=""style.backgroundColor=''""><td width='15%'>" & getMese(i) & "</td>"
primo=datePart("W","01/" & i & "/" & year(oggi))
if primo=7 then
start=1
else
start=1+(7-primo)
end if
nGiorni=giorniMese(i,year(oggi))
for y=start to nGiorni
Response.Write"<td width='4%' align='right'> " & y & ".</td>"
'if y=settimana and mese=mese then
If Rs("prezzo") <> 0 and isNumeric(Rs("prezzo")) then
Response.Write"<td class='dispo'>" & formatcurrency (Rs("prezzo")) & "</td>"
else
Response.Write"<td class='ndispo'></td>"
end if
rs.movenext
y=y+6
next
Response.Write"</tr>"
next
%>
query:
sql =" select * from disponibilita WHERE rif LIKE '%"& rif &"%' order by IDdisponibilita"