Código PHP:
<!--#include file="biblioteca/conexion.asp" -->
<%
id_matriz = "1"
NxSQL ="SELECT * FROM tpm_nivelesmatriz WHERE id_matriz = '"&id_matriz&"' and nivel = '0' "
Set RS = Server.CreateObject("ADODB.Recordset")
RS.Open NxSQL, oConn,3,1
id_matriz = "1"
NxSQL ="SELECT * FROM tpm_nivelesmatriz WHERE id_matriz = '"&id_matriz&"' and nivel = '1' "
Set RSx1 = Server.CreateObject("ADODB.Recordset")
RSx1.Open NxSQL, oConn,3,1
id_matriz = "1"
NxSQL ="SELECT * FROM tpm_nivelesmatriz WHERE id_matriz = '"&id_matriz&"' and nivel = '2' "
Set RSx2 = Server.CreateObject("ADODB.Recordset")
RSx2.Open NxSQL, oConn,3,1
%>
<table width="300" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
<tr bgcolor="#FFFFFF">
<td width="50">
<div align="center" class="Titulo">NIVEL 0</div></td>
<td width="250">
<table width="250" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<%do while not Rs.eof%>
<td height="20" bgcolor="#FFFFFF"> <%
codigo_curso = Rs("cod_curso")
NxSQL ="SELECT * FROM tpm_cursos WHERE codigo_curso = '"&codigo_curso&"' "
Set Rsx = Server.CreateObject("ADODB.Recordset")
Rsx.Open NxSQL, oConn,3,1
%> <%=Rsx("descripcion")%></td>
</tr>
<%
Rs.MoveNext
loop
%>
</table></td>
</tr>
</table>
<table width="300" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
<tr bgcolor="#FFFFFF">
<td width="50">
<div align="center" class="Titulo">NIVEL 1</div></td>
<td width="250">
<table width="250" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<%do while not Rsx1.eof%>
<td height="20" bgcolor="#FFFFFF"> <%
codigo_curso = Rsx1("cod_curso")
NxSQL ="SELECT * FROM tpm_cursos WHERE codigo_curso = '"&codigo_curso&"' "
Set Rsx1 = Server.CreateObject("ADODB.Recordset")
Rsx1.Open NxSQL, oConn,3,1
%> <%=Rsx1("descripcion")%></td>
</tr>
<%
Rsx1.MoveNext
loop
%>
</table></td>
</tr>
</table>
<table width="300" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
<tr bgcolor="#FFFFFF">
<td width="50">
<div align="center" class="Titulo">NIVEL 2</div></td>
<td width="250">
<table width="250" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<%do while not Rsx2.eof%>
<td height="20" bgcolor="#FFFFFF"> <%
codigo_curso = Rsx2("cod_curso")
NxSQL ="SELECT * FROM tpm_cursos WHERE codigo_curso = '"&codigo_curso&"' "
Set Rsx2 = Server.CreateObject("ADODB.Recordset")
Rsx2.Open NxSQL, oConn,3,1
%> <%=Rsx2("descripcion")%></td>
</tr>
<%
Rsx2.MoveNext
loop
%>
</table></td>
</tr>
</table>