Ver Mensaje Individual
  #2 (permalink)  
Antiguo 15/04/2009, 04:08
femolina
 
Fecha de Ingreso: septiembre-2006
Mensajes: 60
Antigüedad: 17 años, 7 meses
Puntos: 0
Respuesta: Recuperar ultimo registro

Uso este codigo y me recupera toda la base de datos y a mi me gustaría recuperar solo el ultimo registro....

//Ejecutamos la sentencia SQL
$result=mysql_query("select * from clientes");
?>
<table width="1157" align="center">
<tr>
<th width="57"><div align="left">Id</div></th>
<th width="58"><div align="center">Fecha</div></th>
<th width="135"><div align="left">Torneo</div></th>
<th width="75"><div align="left">Jornada</div></th>
<th width="243"><div align="left">Partido</div></th>
<th width="89"><div align="left">Resultado</div></th>
<th width="342"><div align="left">Goleadores</div></th>
</tr>
<div align="left">
<?
//Mostramos los registros
while ($row=mysql_fetch_array($result))
{
echo '<td>'.$row["Id"].'</td>';
echo '<td>'.$row["fecha"].'</td>';
echo '<td>'.$row["torneo"].'</td>';
echo '<td>'.$row["jornada"].'</td>';
echo '<td>'.$row["partido"].'</td>';
echo '<td>'.$row["resultado"].'</td>';
echo '<td>'.$row["goleadores"].'</td></tr>';
}
mysql_free_result($result)
?>