Ver Mensaje Individual
  #2 (permalink)  
Antiguo 17/01/2010, 06:59
SainT90
 
Fecha de Ingreso: enero-2008
Ubicación: /España/Galicia
Mensajes: 928
Antigüedad: 16 años, 9 meses
Puntos: 21
Respuesta: random sin repetir

lo haces en php?

1 while.

$var = false;

while($var != true) {
.... order by rand() LIMIT 1

comprobamos si voto, si voto. no acemos nada y ke repita el while, si no voto.

$var = true;

}


PD: te aconsejo poner algo asi

$var = false;
$c = 0;
while($var != true or $c == 20) {
$c++;


porque si no ahi noticias, o voto todas, nunca sale del bucle.

o tambien puedes sacar en el while, noticias 1 por 1 hasta que no vote.