Ver Mensaje Individual
  #6 (permalink)  
Antiguo 18/09/2011, 13:18
roxguel
 
Fecha de Ingreso: mayo-2009
Ubicación: Los Cerrillos
Mensajes: 5
Antigüedad: 15 años
Puntos: 0
Respuesta: Un "while" dentro de otro, y necesito que cambien las variables

Muchas gracias por su atencion, gracias a sus aportes arme esto que parece haber funcionado:
Código PHP:
Ver original
  1. while($rows = mysql_fetch_array($artistas))
  2.                 {
  3.                   echo "<tr>";
  4.                   echo "<td align='center'><img src='http://" . $rows['imagen'] . "'></td>";
  5.                   echo "</tr><tr>";
  6.                   echo "<td align='center'>- <u>" . $rows['artista'] . "</u> -</td>";
  7.                   echo "</tr>";
  8.                   echo "<tr>";
  9.                   echo "<td>";
  10.                                    
  11.                                        
  12.                                                                        
  13.                                     //while($row = mysql_fetch_array(mysql_query("SELECT * FROM WHERE Artista='".$rows['artista']."'")))
  14.                                     //{
  15.                                     //  echo "".$row['cancion']. "<br>" ;
  16.                                     //}
  17.                                    
  18.                                    
  19.                                     $SQL = "SELECT * FROM ".$rows['artista']."";
  20.                                     $canciones = mysql_query($SQL);
  21.                                     while($row = mysql_fetch_array($canciones)){
  22.          
  23.                                       echo "<br><a href='http://".$row['link']."' target='_blank'/>".$row['cancion']. "</a> <i>".$row['ft']."</i>" ;
  24.          
  25.                                     }
  26.                  
  27.                   echo "</td>";
  28.                   echo "</tr>";
  29.                   echo "<tr><td><img src='http://locuraurbana.com/images/divisor1.png'></td></tr>";
  30.                 }

Muchas gracias, en serio.