Asp classic 将asp脚本转换为php以使用命令访问sql server

Asp classic 将asp脚本转换为php以使用命令访问sql server,asp-classic,Asp Classic,我想使用PHP和Mysql将一个与MS access数据库一起工作的asp webapp更新为一个新的webapp。webapp依靠一个masterquery从HP Service Center使用的sql server中提取数据,然后将数据放入表中。 一位以前的同事创建了asp脚本,到目前为止,我是一名经验丰富的开发人员。 脚本使用 cmd1.CommandText = "[IncidentMap].[uSp_proj_IM_IncidentList_SelectL]" 我不知道它到底是什

我想使用PHP和Mysql将一个与MS access数据库一起工作的asp webapp更新为一个新的webapp。webapp依靠一个masterquery从HP Service Center使用的sql server中提取数据,然后将数据放入表中。 一位以前的同事创建了asp脚本,到目前为止,我是一名经验丰富的开发人员。 脚本使用

cmd1.CommandText = "[IncidentMap].[uSp_proj_IM_IncidentList_SelectL]" 
我不知道它到底是什么意思,也不知道在PHP中放在哪里

完整的脚本:

<%

ReDim tmp_tab(1000)


Set cn1 = Server.CreateObject("ADODB.Connection")
Set cmd1 = Server.CreateObject("ADODB.Command")
Set rs1 = Server.CreateObject("ADODB.Recordset")

ds = "Provider=SQLOLEDB;Integrated Security=SSPI;Persist Security       Info=False;Initial Catalog=PRG_PRD;Data Source=PRG_PRD.sql.somedomain\SQL1;"
cn1.Open ds
Set cmd1.ActiveConnection = cn1
cmd1.CommandText = "[IncidentMap].[uSp_proj_IM_IncidentList_SelectL]"    
Set rs1 = cmd1.execute

If Not rs1.EOF Then
DataFound = true
Data = rs1.getrows
Else
DataFound = false
End If

If DataFound = true Then
nb_max_interv=Ubound(Data,2)
ReDim tableau_donnees(Ubound(Data,2))
ligne=0
col=0
        For ctr = 1 To Ubound(Data,2)
            For nb_col=0 to 27

                if Data(nb_col,ctr)<>"" then
                    'tmp_tab(nb_col)=replace(Data(nb_col,ctr),"'"," ")
                    tempo=Data(nb_col,ctr)
                    tempo2=replace(tempo,"'"," ")
                    tempo3=replace(tempo2,chr(34)," ")
                    tempo4=replace(tempo3,chr(174)," ")
                    tempo5=replace(tempo4,chr(132)," ")
                    tempo6=replace(tempo5,chr(147)," ")
                    tempo7=replace(tempo6,chr(148)," ")
                    tempo8=replace(tempo7,chr(171)," ")
                    tempo9=replace(tempo8,chr(187)," ")
                    tempo10=replace(tempo9,chr(39)," ")
                    tempo11=replace(tempo10,chr(145)," ")
                    tempo12=replace(tempo11,chr(146)," ")
                    tmp_tab(nb_col)=tempo12


                else
                    tmp_tab(nb_col)=Data(nb_col,ctr)
                end if

            Next    
            If tmp_tab(26)<>"" then
                tps_restant=datediff("n",now(),tmp_tab(26))
                else
                tps_restant=0
            end if
            Tps_depuis_LastUpdate=datediff("n",tmp_tab(25),now())

            SQL2="INSERT INTO data_incident (IncidentNumber,Owner,TicketStatus,AlertLevel,IncidentTitle,Description,LastName,FirstName,UserContactInformation,PhoneContactInformation,MobileContactInformation,EmailContactInformation,X1,CP,Location,Address,X2,ConfigurationItem,Hostname,AssignmentGroup,AssigneeName,Urgency,Impact,Priority,OpenedAt,LastUpdatedAt,Expiration,LastUpdatedBy,Temps_Restant,Temps_depuis_LastUpdate) VALUES('"&tmp_tab(0)&"','"&tmp_tab(1)&"','"&tmp_tab(2)&"','"&tmp_tab(3)&"','"&tmp_tab(4)&"','"&tmp_tab(5)&"','"&tmp_tab(6)&"','"&tmp_tab(7)&"','"&tmp_tab(8)&"','"&tmp_tab(9)&"','"&tmp_tab(10)&"','"&tmp_tab(11)&"','"&tmp_tab(12)&"','"&tmp_tab(13)&"','"&tmp_tab(14)&"','"&tmp_tab(15)&"','"&tmp_tab(16)&"','"&tmp_tab(17)&"','"&tmp_tab(18)&"','"&tmp_tab(19)&"','"&tmp_tab(20)&"','"&tmp_tab(21)&"','"&tmp_tab(22)&"','"&tmp_tab(23)&"','"&tmp_tab(24)&"','"&tmp_tab(25)&"','"&tmp_tab(26)&"','"&tmp_tab(27)&"','"&tps_restant&"','"&Tps_depuis_LastUpdate&"')"

            Set cat2 = Server.CreateObject("ADODB.Recordset")
            cat2.Open sql2, conn, 3, 3          
        Next
End If
'conn.close

%>

有人知道我如何构造一个PDO连接字符串,然后用拉取的数据更新mysql数据库吗