Helmut: Datum un MySQL

Beitrag lesen

Aber wo das ist hier die frage.
Hier mal das komplette script.

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Besucher Statistik im Intranet</title>
</head>
<body>

<%
strComplete = "Driver=MySQL ODBC 3.51 Driver;Server=localhost;" &_
"Option=3;UID=intranet;DATABASE=intranet;"
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.open strComplete

Set RS = CreateObject("ADODB.Recordset")
rs.CursorType = 3
rs.CursorLocation = 3
rs.LockType = 3

SQL = "SELECT t_besucher.id, t_besucher.ip, t_besucher.name, t_besucher.datum, t_besucher.uhrzeit FROM t_besucher WHERE t_besucher.datum='2004-03-22' ORDER BY t_besucher.id DESC;"

RS.Open SQL, objconn

Response.Write ("<center>")
Response.Write ("<font face=Arial size=6><b><i><u>Besucher Statistik vom Intranet")
Response.Write ("<br>") & ("von Datum: ") & date &("</b></i></u></font>")
Response.Write ("<br><center><a href=statistik_gesamt.asp>gesamte Statistik abrufen</a></center>")
Response.Write ("<br><br>")
Response.Write ("<table border=1>")

Response.Write ("<td width=130><b><i><u>Besuchernummer:</b></i></u></td>")
Response.Write ("<td width=150><b><i><u>Besucher - IP:</b></i></u></td>")
Response.Write ("<td width=180><b><i><u>Besucher Name:</b></i></u></td>")
Response.Write ("<td width=100><b><i><u>besucht am:</b></i></u></td>")
Response.Write ("<td width=100><b><i><u>besucht um:</b></i></u></td>")
Response.Write ("</tr>")

while (not rs.eof)

Response.Write ("<tr>")
 Response.Write ("<td>")
 response.write rs("id")
 Response.Write ("</td>")
 Response.Write ("<td>")
 Response.write rs("ip")
 Response.Write ("</td>")
 Response.Write ("<td>")
 response.write rs("name")
 Response.Write ("</td>")
 Response.Write ("<td>")
 response.write rs("datum")
 Response.Write ("</td>")
 Response.Write ("<td>")
 response.write rs("uhrzeit")
 Response.Write ("</td>")
wend
Response.Write ("</table>")
Rs.Close
objConn.Close
Set objConn = Nothing
%>

<form method = "POST" action="statistik_datum.asp">
<p align="center">Bitte geben Sie hier ein Datum ein für den Tag den Sie für
die Statistik brauchen.<br>
Beispiel: <% =date %><br>
<input type="text" name="datum"><br>
<input type="submit" value="OK" name="ok">
</form>

</body>