Ver Mensaje Individual
  #1 (permalink)  
Antiguo 24/07/2004, 08:31
hammmer
 
Fecha de Ingreso: mayo-2004
Mensajes: 75
Antigüedad: 20 años
Puntos: 0
dos consultas en el mismo script

Hola, como se podria hacer para meter 2 consultas en el mismo script? este es el codigo de las noticias:

<?
include("config.inc.php");
$mostrar = 6 ;
$sql = "SELECT * FROM noticias ORDER BY id desc LIMIT $mostrar";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result))
{
echo "<br><br>
<table width=100% border=0 cellpadding=5 cellspacing=1 bgcolor=#000000>
<tr bgcolor=#CCCCCC background=file:///C|/FoxServ/www/pchard/imagenes/borde.jpg>
<td width=80%><span class=Estilo7>$row[titulo]</span></td>
<td width=20%><div align=right>$row[fecha]</div></td>
</tr>
<tr bgcolor=#CCCCCC background=file:///C|/FoxServ/www/pchard/imagenes/bloque_noticias.jpg>
<td colspan=2>
$row[noticia]
</td>
</tr>
<tr bgcolor=#CCCCCC background=file:///C|/FoxServ/www/pchard/imagenes/borde.jpg>
<td colspan=2>
<table width=100% border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=85%><b>Enviada por:</b> $row[usuario]</td>
<td width=15%><a href=seccion/noticias.php>Leer más</a></td>
</tr>
</table></td>
</tr>
</table>";
}
?>

y aki esta el de las noticias completas:

<?
include("config.inc.php") ;
$id=$_GET['id'];
$sql = "SELECT * FROM noticias where ID='$id'";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result))
{
// Se agregarán los <br> correspondientes a la noticia extendida
$noticiaext = $row[noticiaext];
$noticiaext = str_replace("\r\n","<br>",$noticiaext);

echo "<table width=100% border=0 cellpadding=5 cellspacing=1 bgcolor=#000000>
<tr bgcolor=#CCCCCC background=file:///C|/FoxServ/www/pchard/imagenes/borde.jpg>
<td width=80%><span class=Estilo7>$row[titulo]</span></td>
<td width=20%><div align=right>$row[fecha]</div></td>
</tr>
<tr bgcolor=#CCCCCC background=file:///C|/FoxServ/www/pchard/imagenes/bloque_noticias.jpg>
<td colspan=2>
$row[noticia]
<br><br>$noticiaext</td>
</tr>
<tr bgcolor=#CCCCCC background=file:///C|/FoxServ/www/pchard/imagenes/borde.jpg>
<td colspan=2>
<table width=100% border=0 cellpadding=0 cellspacing=0>
<tr>
<td width=85%><b>Enviada por:</b> $row[usuario]</td>
</tr>
</table></td>
</tr>
</table>";
echo "<a href=../index.php>Volver</a>";
}
?>

el problema esta cuando el doy a leer mas, ke las noticias completas se abren en una nueva pagina en blanco y ya no se me mantiene el estilo de la web, haber si me pueden ayudar .
Gracias y saludos.