Código PHP:
anyo1=request.Querystring("anyo1")
nola1=request.Querystring("nola1")
set ola1=createobject("ADODB.Recordset")
ola1.CursorType = adOpenKeyset
ola1.LockType = adLockOptimistic
sql_ola1="SELECT * from consEmpRecibidasEvolucion1 where año=" & anyo1 & " AND Nola='" & nola1 &"'"
ola1.Open sql_ola1, conn
i=1
Response.Write("<table width='95%' border='1'><tr><td valign='top'>")
Response.Write("Ola1<br>")
While Not ola1.eof
Response.Write (i & ". " & ola1("npanelista")&"<br>")
temporal.addnew
temporal.fields("npanelista") = ola1("npanelista")
temporal.fields("FaxConllamadas1") = ola1("FaxConLlamadas")
temporal.fields("FaxEspontaneo1") = ola1("FaxEspontaneo")
temporal.fields("Telefono1") = ola1("Telefono")
temporal.update
ola1.movenext
i = i + 1
wend
Response.Write("</td>")
'HASTA AQUI NINGUN PROBLEMA
anyo5=request.querystring("anyo5")
nola5=request.querystring("nola5")
set ola5=createobject("ADODB.Recordset")
ola5.CursorType = adOpenKeyset
ola5.LockType = adLockOptimistic
sql_ola5="SELECT * from consEmpRecibidasEvolucion1 where año=" & anyo5 & " AND Nola='" & nola5 &"'"
ola5.Open sql_ola5, conn
i=1
Response.Write("<td valign='top>Ola5<br>")
If not temporal.eof then temporal.movefirst
While Not ola5.eof
If isnull(ola5.fields("tmpnpanelista")) then
temporal.addnew
temporal.fields("npanelista") = ola5("npanelista")
temporal.fields("FaxConllamadas5") = ola5("FaxConLlamadas")
temporal.fields("FaxEspontaneo5") = ola5("FaxEspontaneo")
temporal.fields("Telefono5") = ola5("Telefono")
temporal.update
else
While not temporal.eof
if temporal.fields("npanelista") <> ola5.fields("npanelista") then
temporal.movenext
else
temporal.fields("npanelista") = ola5("npanelista")
temporal.fields("FaxConllamadas5") = ola5("FaxConLlamadas")
temporal.fields("FaxEspontaneo5") = ola5("FaxEspontaneo")
temporal.fields("Telefono5") = ola5("Telefono")
temporal.update
end if
wend
end if
Response.Write (i & ". " & ola5("npanelista")&"<br>")
ola5.movenext
i = i + 1
wend
Response.Write("</td>")
