Ver Mensaje Individual
  #9 (permalink)  
Antiguo 10/06/2014, 19:45
Avatar de Triby
Triby
Mod on free time
 
Fecha de Ingreso: agosto-2008
Ubicación: $MX->Gto['León'];
Mensajes: 10.106
Antigüedad: 15 años, 8 meses
Puntos: 2237
Respuesta: Repetir DO..WHILE varias veces?

Rebobina el apuntador de la consulta y vuelve a empezar:

Código PHP:
Ver original
  1. $result = mysql_query(/* Tu consulta */);
  2. while($row = mysql_fetch_assoc($result)){
  3.  // Primera ejecución
  4. }
  5.  
  6. // Devuelve el apuntador al inicio
  7. mysql_data_seek($result, 0);
  8. while($row = mysql_fetch_assoc($result)){
  9.  // Segunda ejecución
  10. }
  11.  
  12. // Necesitas hacerlo nuevamente?... no problem, repite
__________________
- León, Guanajuato
- GV-Foto