Ver Mensaje Individual
  #7 (permalink)  
Antiguo 07/06/2003, 21:17
Avatar de sdf23
sdf23
 
Fecha de Ingreso: diciembre-2002
Mensajes: 297
Antigüedad: 21 años, 4 meses
Puntos: 0
hola mira si tu tabla tiene un campo id y es numerico y auto incrment te servira esto me ha funcionado:

Código PHP:
<?
$conex
=mysql_connect("localhost","root","");
mysql_select_db("huevox",$conex);
$cuanto=mysql_query("select COUNT(*) from news");
$cuanto2=mysql_result($cuanto,0);

$azar=rand($cuanto2,1);
$mostramos=mysql_query("select * from news where id='$azar'");
while(
$row=mysql_fetch_assoc($mostramos)){

echo 
$row[titulo];

?>
me avisas si te sirve
__________________

la vida es bella cuando no es culera