Ver Mensaje Individual
  #5 (permalink)  
Antiguo 15/09/2008, 10:44
Avatar de Marvin
Marvin
Colaborador
 
Fecha de Ingreso: febrero-2005
Ubicación: global $Chile->Santiago;
Mensajes: 1.991
Antigüedad: 19 años, 2 meses
Puntos: 81
Respuesta: mysql_fetch_array y mysql_free_result

Trata con esto:
Código php:
Ver original
  1. <?php
  2. $nom = $_GET["nom"];
  3. $llinatge1 = $_GET["llinatge1"];
  4. $llinatge2 = $_GET["llinatge2"];
  5. if ($llinatge1 == NULL){
  6. echo '<div align="center">No has aplenat un camp necessàri!</div>';
  7. }else{}
  8. ?>
  9. <?php
  10. include ('bd.php');
  11. ?>
  12. <?php
  13. $result=mysql_query("select * from actuacions where llinatge1=$llinatge1") or die("Error de MySQL: ".mysql_error());
  14. ?>
  15. <p>&nbsp;</p>
  16. <table border="0" align="center" >
  17.       <tr>
  18.       <th align="center">Nom</th>
  19.       <th align="center">1r Llinatge</th>
  20.       <th align="center">2n Llinatge</th>
  21.       <th align="center">Cicle</th>
  22.       <th align="center">Curs</th>
  23.       <th align="center">Grup</th>
  24. <?php
  25. while ($row=mysql_fetch_array($result)){
  26. echo '<tr><td>'.$row["nom"].'</td>';
  27. echo '<td>'.$row["llinatge1"].'</td>';
  28. echo '<td>'.$row["llinatge2"].'</td>';
  29. echo '<td>'.$row["cicle"].'</td>';
  30. echo '<td>'.$row["curs"].'</td>';
  31. echo '<td>'.$row["grup"].'</td></tr>';
  32. }
  33. ?>
  34. </table>

Suerte!
__________________
El que dice "Solo sé que nada sé", esta asumiendo que sabe algo.
Lea las FAQ's!