Ver Mensaje Individual
  #151 (permalink)  
Antiguo 14/07/2006, 01:47
Avatar de Spydis
Spydis
 
Fecha de Ingreso: mayo-2003
Ubicación: Donosti
Mensajes: 90
Antigüedad: 23 años, 4 meses
Puntos: 1
ok, ya lo he arreglado
Código PHP:
<?php 
     $conexion 
= mysql_connect("******","******","*******"); 
mysql_select_db("*******", $conexion) OR die("No se puede establecer la conexión a MySQL"); 
    
$sql = mysql_query("SELECT * FROM ibf_topics ORDER BY last_post DESC LIMIT 0,5") or die (mysql_error()); 
while (
$row = mysql_fetch_array($sql)) { 
$id = "$row[tid]"; 
$titulo = "$row[title]";
$respuestas = "$row[posts]";
$responder = "$row[last_poster_name]";
echo 
"<div align='left'>";
echo 
"<img src='images/guion.gif' border='0'> <a href='foro/index.php?showtopic=$id&view=getlastpost' target='_blank'>";

if (
strlen($titulo) > 20) 
    echo 
substr($row["title"],0,20).'... [+]';
else
echo 
$row["title"];

echo 
"</a><br />- <b>Respuestas</b>: $respuestas / <b>Por</b>: $responder<br />";
echo 
"</div>";
    } 
?>
Salu2!!