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

bueno, lo he puesto asi, deveria de valer no?

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 2";  
$result mysql_query($sql$connect) or die (mysql_error());  
 
while (
$row mysql_fetch_array($result)) {  
echo 
'<table align="center">
    <tr>
      <td width="135" align="center"><img style="width: 120px; height: 180px;" src="'
.$row['caratula'].'" /></td>
    <td width="135" align="center"><img style="width: 120px; height: 180px;" src="'
.$row['caratula'].'" /></td></tr>
    <tr>
      <td align="center">'
.$row['nombre'].'</td>
    <td align="center">'
.$row['nombre'].'</td></tr>
    <tr>
      <td>&nbsp;</td>
    <td>&nbsp;</td></tr>
    <tr>
      <td align="center"><a href="enlace.php?ver='
.$row['id'].'">Ver Mas</a></td>
    <td align="center"><a href="enlace.php?ver='
.$row['id'].'">Ver Mas</a></td></tr>
</table>'
;

?>
</body>
</html>

Edito: lo he puesto asi, y me sige dando solo 1, en este caso el del prince of persia:


Última edición por Most; 08/06/2010 a las 09:19