Ver Mensaje Individual
  #4 (permalink)  
Antiguo 22/12/2002, 23:42
Avatar de garcef
garcef
 
Fecha de Ingreso: agosto-2001
Ubicación: Querétaro, México
Mensajes: 289
Antigüedad: 23 años, 8 meses
Puntos: 0
Gracias por sus comentarios pero nada

Hice lo de Daniel, pero sucede que tuve algunos errorcillos ya intente lo que dice chulo soy pero sucede que me mostraba un error



Ahora hice lo siguiente, pero sucede que solo me muestra un registro, el correspondiente al que muestra la noticia.

No supe como pude poner mi_variable=<%xxxx%> porque me indicaba que habia un error de redacción

Ahi esta la página


<%
Set con = Server.CreateObject("ADODB.Connection")
Con.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
Server.MapPath("misnoticias.mdb"))
sql = "SELECT * FROM Mexico WHERE id=" & Request.QueryString("id") & ""

'Ejecuta un sentencia SQL de consulta
'Recorre todas las filas del resultado
set result = Con.Execute(sql)
%>
<html>
<head>
<title><%=result("titulo")%> </title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
</head>
<body>
<table border="1" width="100%" height="266">
<tr>
<td width="18%" valign="top" height="260"></td>
<td width="60%" valign="top" height="260"><table border="1" width="100%">
<tr>
<td width="100%"><%=result("titulo")%> <div align="left"><table
border="1" width="50%" align="right">
<tr>
<td width="100%">Relacionadas</td>
</tr>
<tr>
<td width="100%"><%
Dim conexion, registros, basedatos
basedatos = Server.MapPath("misnoticias.mdb")
Set conexion = Server.CreateObject("ADODB.Connection")
conexion.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & basedatos & ";"
Set registros = conexion.Execute("SELECT relacion FROM Mexico Where titulo LIKE '%" & mi_variable & "%'")

Do While Not registros.EOF
mi_variable = titulo
Set registros = conexion.Execute (SQL)

Response.Write "<br><b><font face=Verdana size=1><a href=noticia2.asp?id=" &result.Fields("id") & ">"&result.Fields("titulo")&"</a></b><b><br><font color=""009999""><b></font></font>"

registros.MoveNext
Loop
registros.Close
Set registros = Nothing
conexion.Close
Set conexion = Nothing
%>
<p></td>
</tr>
</table>
</div><p><%=result("copete")%> <br>
<%=result("fecha")%> <br>
<p><%=result("noticia")%> </p></p>
<p>&nbsp;</td>
</tr>
</table>
</td>
<td width="22%" valign="top" height="260"></td>
</tr>
</table>
</body>
</html>

el código en Azul es el que proporiona la noticia

El código rojo es el de las relacionadas y del problema
__________________
garcef
Facebook: url]https://www.facebook.com/memelandiax[/url]
Twitter: @Memelandiax Vine:memelandiax Instagram: memelandiax Youtube: memelandiax