Hvordan får jeg tidspunktet sat på?
HejsaJeg sidder og roder lidt med noget statistik til min side, men har fået et problem.
Jeg bruger denne kode til at se hvornår folk besøger siden:
--
Set Rs00 = ConnS.Execute("SELECT COUNT(*) AS FOUND FROM statistik Where Cstr(tid) LIKE '00%';" )
Set Rs01 = ConnS.Execute("SELECT COUNT(*) AS FOUND FROM statistik Where Cstr(tid) LIKE '01%';" )
Set Rs02 = ConnS.Execute("SELECT COUNT(*) AS FOUND FROM statistik Where Cstr(tid) LIKE '02%';" )
Set Rs03 = ConnS.Execute("SELECT COUNT(*) AS FOUND FROM statistik Where Cstr(tid) LIKE '03%';" )
Set Rs04 = ConnS.Execute("SELECT COUNT(*) AS FOUND FROM statistik Where Cstr(tid) LIKE '04%';" )
Set Rs05 = ConnS.Execute("SELECT COUNT(*) AS FOUND FROM statistik Where Cstr(tid) LIKE '05%';" )
Set Rs06 = ConnS.Execute("SELECT COUNT(*) AS FOUND FROM statistik Where Cstr(tid) LIKE '06%';" )
Set Rs07 = ConnS.Execute("SELECT COUNT(*) AS FOUND FROM statistik Where Cstr(tid) LIKE '07%';" )
Set Rs08 = ConnS.Execute("SELECT COUNT(*) AS FOUND FROM statistik Where Cstr(tid) LIKE '08%';" )
Set Rs09 = ConnS.Execute("SELECT COUNT(*) AS FOUND FROM statistik Where Cstr(tid) LIKE '09%';" )
Set Rs10 = ConnS.Execute("SELECT COUNT(*) AS FOUND FROM statistik Where Cstr(tid) LIKE '10%';" )
Set Rs11 = ConnS.Execute("SELECT COUNT(*) AS FOUND FROM statistik Where Cstr(tid) LIKE '11%';" )
Set Rs12 = ConnS.Execute("SELECT COUNT(*) AS FOUND FROM statistik Where Cstr(tid) LIKE '12%';" )
Set Rs13 = ConnS.Execute("SELECT COUNT(*) AS FOUND FROM statistik Where Cstr(tid) LIKE '13%';" )
Set Rs14 = ConnS.Execute("SELECT COUNT(*) AS FOUND FROM statistik Where Cstr(tid) LIKE '14%';" )
Set Rs15 = ConnS.Execute("SELECT COUNT(*) AS FOUND FROM statistik Where Cstr(tid) LIKE '15%';" )
Set Rs16 = ConnS.Execute("SELECT COUNT(*) AS FOUND FROM statistik Where Cstr(tid) LIKE '16%';" )
Set Rs17 = ConnS.Execute("SELECT COUNT(*) AS FOUND FROM statistik Where Cstr(tid) LIKE '17%';" )
Set Rs18 = ConnS.Execute("SELECT COUNT(*) AS FOUND FROM statistik Where Cstr(tid) LIKE '18%';" )
Set Rs19 = ConnS.Execute("SELECT COUNT(*) AS FOUND FROM statistik Where Cstr(tid) LIKE '19%';" )
Set Rs20 = ConnS.Execute("SELECT COUNT(*) AS FOUND FROM statistik Where Cstr(tid) LIKE '20%';" )
Set Rs21 = ConnS.Execute("SELECT COUNT(*) AS FOUND FROM statistik Where Cstr(tid) LIKE '21%';" )
Set Rs22 = ConnS.Execute("SELECT COUNT(*) AS FOUND FROM statistik Where Cstr(tid) LIKE '22%';" )
Set Rs23 = ConnS.Execute("SELECT COUNT(*) AS FOUND FROM statistik Where Cstr(tid) LIKE '23%';" )
Dim MyArraytid (24)
MyArraytid(0) = Rs00("FOUND")
MyArraytid(1) = Rs01("FOUND")
MyArraytid(2) = Rs02("FOUND")
MyArraytid(3) = Rs03("FOUND")
MyArraytid(4) = Rs04("FOUND")
MyArraytid(5) = Rs05("FOUND")
MyArraytid(6) = Rs06("FOUND")
MyArraytid(7) = Rs07("FOUND")
MyArraytid(8) = Rs08("FOUND")
MyArraytid(9) = Rs09("FOUND")
MyArraytid(10) = Rs10("FOUND")
MyArraytid(11) = Rs11("FOUND")
MyArraytid(12) = Rs12("FOUND")
MyArraytid(13) = Rs13("FOUND")
MyArraytid(14) = Rs14("FOUND")
MyArraytid(14) = Rs15("FOUND")
MyArraytid(16) = Rs16("FOUND")
MyArraytid(17) = Rs17("FOUND")
MyArraytid(18) = Rs18("FOUND")
MyArraytid(19) = Rs19("FOUND")
MyArraytid(20) = Rs20("FOUND")
MyArraytid(21) = Rs21("FOUND")
MyArraytid(22) = Rs22("FOUND")
MyArraytid(23) = Rs23("FOUND")
for i = 0 to 23
alle_tal = alle_tal + MyArraytid(i)
next
%>
--
<%
for i = 0 to 23
%>
<table>
<tr>
<td width="80"><b>----her vil jeg have tidspunktet stående-----:</b>></td>
<td><% temp = CInt((MyArraytid(i)/alle_tal)*100)%><img border="0" src="streg.jpg" width="<%response.write temp*10%>" height="10"><%=temp%>% ( <%= MyArraytid(i) %> )</td>
</tr>
</table>
<%
next
%>
Men jeg kan ikke få den til at skrive tidspunktet ud for hver graf. Det skal altså være sådan at den fx skriver "kl. 22-23" ud for en post som hedder "22" i databasen.
Hvordan går jeg det?