fra Access til MySQL
HejJeg skal til at skifte webhotel, og de understøtter kun MySQL. Men jeg aner ikke lige forskellen på de 2.
Har følgende kode.. Men hvordan laver man det lige om til MySQL ??
---------------- tourdate.asp --------------------------
<%@ Language=VBScript %>
<!--#include File="tabel.asp"-->
<html>
<style type="text/css">
<!--
a:hover { font-family: Arial, Helvetica, sans-serif; font-size: 10pt; font-weight: bold; color: #CCCCCC; text-decoration: none}
-->
</style>
<link rel="stylesheet" href="style.css"></head>
<body >
<table width="100%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td>
<p align=center> Tour listen er under konstant opdatering! </p>
<%
dim objConn, oRS, SQL
Set objConn = Server.CreateObject("ADODB.Connection")
'--oprette recordset
objconn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.mappath("tourdate/spilletider.mdb")
Set oRS = Server.CreateObject("ADODB.Connection")
'--Åbne recordset
set oRS = objConn.Execute("SELECT Spillested, Ugedag, Spilletid, Byen, Dato FROM spilletider order by dato")
'--Udskriv poster
Tabel oRS
oRS.Close
Set oRS = Nothing
objConn.Close
Set objConn = Nothing
%>
</td>
</tr>
</table>
</body>
</html>
--------------------- tabel fil-------------------------
<center>
<%
Sub Tabel(Byref objRecordSet)
Dim i
Response.Write"<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=2 ALIGN=CENTER frame=below>"
'udskriv header( feltnavn)
Response.Write "<tr bgColor=#CDC9C9>"
For i = 0 to objRecordset.Fields.Count - 1
Response.Write "<td><font face=arial size=1><b>" & objRecordset.fields.item(i).name & "</b></font></td>"
Next
Response.Write "</tr>"
'udskriv krop (feltpost)
j=0
Do While Not objRecordset.EOF
j=j+1
if(j mod 2)=0 then
Response.Write "<tr bgColor=#F8F8FF>"
else Response.Write "<tr bgColor=#E8E8E8>"
End if
For i = 0 to objRecordset.Fields.Count - 1
Response.Write "<td><font face=arial size=2>" & objRecordset.fields.item(i).value & "</font></td>"
Next
objRecordset.MoveNext
Response.Write "</tr>"
Loop
Response.Write "</table>"
End Sub
%>
</center>