Hej mina vännerVeckans matcher
Denna koden skriver ut en tabell över dagens matcher. Hur och var ändrar jag för att skriva ut veckans matcher? Jag har en tippasida som jag försöker få till lite bättre, men eftersom man är relativt ny på det här med programmering så hoppas jag ni har förståelse för min "okunnighet".
<%
Call dbConnect()
Dim checkTime
checkTime = Time()
If checkTime >= "14:00:00" Then
sSQL1 = "SELECT FirstName,LastName,Stad,AntalTippade,Medel,TotalPoints,Svarta,Rosa,UserID,idag FROM qTabellIdag WHERE now = Date() ORDER BY TotalPoints DESC, Medel DESC"
Set rsTabell=connect.Execute(sSQL1)
End If
If checkTime < "14:00:00" Then
sSQL1 = "SELECT FirstName,LastName,Stad,AntalTippade,Medel,TotalPoints,Svarta,Rosa,UserID,idag FROM qTabellIdag WHERE now = Date()-1 ORDER BY TotalPoints DESC, Medel DESC"
Set rsTabell=connect.Execute(sSQL1)
End If
' sSQL1 = "SELECT FirstName,LastName,Stad,AntalTippade,Medel,TotalPoints,Svarta,Rosa,UserID FROM qTabellIdag ORDER BY TotalPoints DESC, Medel DESC"
' Set rsTabell=connect.Execute(sSQL1)
If rsTabell.BOF Then
Response.Write"Inga matcher spelade idag."
Else
arrRows = rsTabell.GetRows()
Call dbDisConnect()
' Kollar antal kolumner, startar på 0
intCols = uBound(arrRows,1)
' Kollar antal rader, startar på 0
intRows = uBound(arrRows,2)
Response.write("<table class=""borderbottom_2"" border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""0"" id=""table2""><tr><td class=""borderbottom_2"" width=""30"" align=""left"">P</td>")
Response.write("<td class=""borderbottom_2"" width=""180"" align=""left"">Namn</td>")
Response.write("<td class=""borderbottom_2"" align=""left"">Status</td><td class=""borderbottom_2"" width=""70"" align=""center"">Tippade</td><td class=""borderbottom_2"" width=""70"" align=""center"">Svarta</td><td class=""borderbottom_2"" width=""70"" align=""center"">Rosa</td>")
Response.write("<td class=""borderbottom_2"" width=""70"" align=""center"">Medel</td><td class=""borderbottom_2"" width=""70"" align=""center"">Poäng</td></tr>")
For cRows = 0 to intRows
If Farg = "<tr class=""Tabellrader1"">" Then
Farg = "<tr class=""Tabellrader2"">"
Else
Farg = "<tr class=""Tabellrader1"">"
End If
If Session("UserID") = arrRows(8, cRows) Then
Farg = "<tr class=""TabellNamn"">"
End If
Response.Write ""&Farg&"<td width=""30"" height=""30"" align=""left"">"& cRows + 1 &"</td>"&_
"<td width=""180"" height=""30"" align=""left"" title="&arrRows(2, cRows)&">"& arrRows(0, cRows) &" " &arrRows(1, cRows) &"</td>"&_
"<td height=""30"" align=""left""> </td><td width=""70"" height=""30"" align=""center"">"& arrRows(3, cRows) &"</td>"&_
"<td width=""70"" height=""30"" align=""center"">"& arrRows(6, cRows) &"</td>"&_
"<td width=""70"" height=""30"" align=""center"">"& arrRows(7, cRows) &"</td>"&_
"<td width=""70"" height=""30"" align=""center"">"& Round(arrRows(4, cRows),3) &"</td>"&_
"<td width=""70"" height=""30"" align=""center"">"& arrRows(5, cRows) &"<td></tr>"
Next
Response.write("</table>")
End If
%>