for i = 1 to intDays
if intcount mod 7 = 0 and intcount > 0 then response.write "</tr><tr>"
if i = day(date()) and mdate = month(now()) and ydate = year(now()) then
response.write "<td align='center' style='background-color:" &color(2)&";'><b>" & I &"</b></td>"
else
response.write "<td align='center' Style='color:#003399'>" & I &"</td>"
end if
intcount = intcount + 1
next
Sen kör jag med databas koppling:
SQL = "Select * from Hello where MONTH(str_date) = " &month(dtmDate)& " and year(str_date) = " &year(dtmDate)& ""
set recset = conn.execute(SQL)
if not recset.eof then
arrmonth = recset.getrows()
men hur gör jag nu så att OM det finns ett datum vid den månad i databasen så ska den bli en länk... blir ju en for sats men jag vet inte riktigt hur man ska göra det för att få in datan.
Dim dtmArray(31)
SQL = "Select str_date from Hello where MONTH(str_date) = " & month(dtmDate) & " and year(str_date) = " & year(dtmDate)& ""
set recset = conn.execute(SQL)
If not recset.eof Then arrmonth = recset.getrows()
If IsArray(arrmonth) Then
For z = 0 To ubound(arrmonth,2)
temp=day(arrmonth(0,z))
dtmArray(temp) = "<a href=""?datum="& FormatDateTime(arrcalRS(0,z),2) &""">"& temp &"</a>"
Next
End if
For i = 1 to intDays
if intcount mod 7 = 0 And intcount > 0 Then response.write "</tr><tr>"
If i = day(date()) And mdate = month(now()) And ydate = year(now()) Then
response.write "<td align='center' style='background-color:" & color(2) &";'><b>" & dtmArray(i) &"</b></td>"
Else
response.write "<td align='center' Style='color:#003399'>" & dtmArray(i) &"</td>"
End if
intcount = intcount + 1
Next