Ver Mensaje Individual
  #6 (permalink)  
Antiguo 08/06/2010, 08:42
Avatar de Most
Most
 
Fecha de Ingreso: marzo-2009
Mensajes: 642
Antigüedad: 17 años, 6 meses
Puntos: 6
Respuesta: mostrar en orden por ID (order by id desc limit 1)

asi esta:

Código PHP:
<html>
<head>
<title>Documento sin t&iacute;tulo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>

<?php
$connect
=mysql_connect("","","");
mysql_select_db("",$connect);
$sql = "SELECT * FROM enlaces order by id desc limit 1";  
$result = mysql_query($sql, $connect) or die (mysql_error());  
 
while (
$row = mysql_fetch_array($result)) { 
    
$nombre = $row['nombre']; 
    
$caratula = $row['caratula']; 
    
$id=$row['id'];
} 
?>
 
<table align="center">
    <tr>
      <td width="135" align="center"><img style="width: 120px; height: 180px;" src="<?php echo $caratula; ?>" /></td>
    <td width="135" align="center"><img style="width: 120px; height: 180px;" src="<?php echo $caratula; ?>" /></td></tr>
    <tr>
      <td align="center"><?php echo $nombre; ?></td>
    <td align="center"><?php echo $nombre; ?></td></tr>
    <tr>
      <td>&nbsp;</td>
    <td>&nbsp;</td></tr>
    <tr>
      <td align="center"><a href="enlace.php?ver=<?php echo $id; ?>">Ver Mas</a></td>
    <td align="center"><a href="enlace.php?ver=<?php echo $id; ?>">Ver Mas</a></td></tr>
</table>
</body>
</html>