![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
15/12/2005, 09:22
|
| | Fecha de Ingreso: enero-2002
Mensajes: 22
Antigüedad: 23 años Puntos: 0 | |
gracias jam1138 Bueno ya esta, gracias, me señalaste el camino. partiendo de lo que me indicaste, hice esto (asi el primer query me lanza la ultima noticia, y el segundo query me lanza las 3 penultimas noticias):
$noti1 = mysql_query("SELECT * from noticia order by artid DESC limit 1")
or die(mysql_error());
$i = 1;
while($row = mysql_fetch_array($noti1)) {
extract($row);
$id = $row["artid"];
$autor = $row["autor"];
$nombre = $row["titulo"];
$sinopsis = $row["sinopsis"];
echo "<table cellspacing=3 cellpadding=2>
<tr><td align=center>
<img src=fotos/$foto height=66></td><td align=center><a style='text-decoration: none' href=articulo.php?artid=$id>
<font color=#000000 face='Verdana' style='font-size: 9px'>$nombre </font></a></td></tr>
</table>";
$noti2= mysql_query("SELECT * from noticia order by artid DESC limit 1,3")
or die(mysql_error());
echo "<table><tr>";
$i = 1;
while($row = mysql_fetch_array($noti2)) {
extract($row);
$id = $row["artid"];
$autor = $row["autor"];
$nombre = $row["titulo"];
$sinopsis = $row["sinopsis"];
echo "<td width=3></td><td align=center><table cellspacing=0 cellpadding=0>
<tr><td align=center>
<img src=fotos/$foto height=44></td></tr>
<tr><td align=center><a style='text-decoration: none' href=articulo.php?artid=$id>
<font color=#000000 face='Verdana' style='font-size: 9px'>$nombre </font></a></td></tr>
</table>";
echo "</td><td background=graficoso/linea1.gif></td>";
if (is_int($i / 3))
echo "</tr>";
$i++;
}
echo "</table>";
?>
__________________ !!!!
() ()
- |