Juan02 de Septiembre del 2004
PreguntaHola a todos tengo una problema que creo que es my facil pero no lo encuentro Tengo una tabla de + 0 - 100 registros y solo quiero mostras solo los 4 ultimos registros.
Este es el codigo en el cual estoy trabajando.... (Este codigo me muetra perfectamente los 100 registros)
<?php
include("Php/config.php");
$consulta=mysql_query("SELECT * FROM noticias order by id desc",$conectar);
$numfilas=mysql_num_rows($consulta);
?>
<table width="210" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#E6E6E6">
<tr>
<th height="26" colspan="2" background="Imagenes/punto_raya1.gif" class="Estilo33" scope="col">Noticies</th>
</tr>
<?php
while ($archiv=mysql_fetch_array($consulta))
{
?>
<tr>
<th width="27" valign="top" scope="col"><span class="Estilo35"><img src="Imagenes/botoneraflecha2.gif" width="12" height="13"></span></th>
<?php echo "<th><left><strong><font color="#0000ff" face="Verdana" size="2"><a href="Php/cat_noticias.php?cod=".$archiv["id"]."" >".$archiv["desc1_noti"]."</font></strong></left></th>"; ?>
</tr>
<?php
}
mysql_close($conectar);
?>
</table>
GRACIAS
Este es el codigo en el cual estoy trabajando.... (Este codigo me muetra perfectamente los 100 registros)
<?php
include("Php/config.php");
$consulta=mysql_query("SELECT * FROM noticias order by id desc",$conectar);
$numfilas=mysql_num_rows($consulta);
?>
<table width="210" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#E6E6E6">
<tr>
<th height="26" colspan="2" background="Imagenes/punto_raya1.gif" class="Estilo33" scope="col">Noticies</th>
</tr>
<?php
while ($archiv=mysql_fetch_array($consulta))
{
?>
<tr>
<th width="27" valign="top" scope="col"><span class="Estilo35"><img src="Imagenes/botoneraflecha2.gif" width="12" height="13"></span></th>
<?php echo "<th><left><strong><font color="#0000ff" face="Verdana" size="2"><a href="Php/cat_noticias.php?cod=".$archiv["id"]."" >".$archiv["desc1_noti"]."</font></strong></left></th>"; ?>
</tr>
<?php
}
mysql_close($conectar);
?>
</table>
GRACIAS
