Ver Mensaje Individual
  #6 (permalink)  
Antiguo 19/03/2005, 12:01
2Fast To You
 
Fecha de Ingreso: septiembre-2003
Ubicación: Santo Domingo - R. Dominicana
Mensajes: 606
Antigüedad: 20 años, 7 meses
Puntos: 0
Hola Amigos

Me gustaría saber como limito esto. Es decir que solo me muestre el ultimo resultado.
Código PHP:
<?php 
     
include("conex.php"); 
     
$link=Conectarse(); 
     
$noticias=mysql_query("select * from noticias",$link); 
?>
Código PHP:
<?php while($row mysql_fetch_array($noticias)) { printf("
<td>%s</td>
</tr>
<tr>
<td>%s</td>
</tr>
<tr>
<td align=\"right\">%s</td>
</tr>
"
$row["titulo"], $row["contenido"], $row["autor"]); } mysql_free_result($noticias); ?>
Ya probé poniendo:
Código PHP:
<?php 
     
include("conex.php"); 
     
$link=Conectarse(); 
     
$noticias=mysql_query("select * from noticias",$link,"limit 1");  
?>
Pero me dá un Error.
Código:
Warning: Wrong parameter count for mysql_query() in d:\users\pilarconst\index.php on line 7

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in d:\users\pilarconst\index.php on line 113

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in d:\users\pilarconst\index.php on line 122
Que puedo hacer ??