Ver Mensaje Individual
  #4 (permalink)  
Antiguo 15/09/2008, 10:40
Avatar de joanfont
joanfont
 
Fecha de Ingreso: marzo-2008
Ubicación: 127.0.0.1
Mensajes: 66
Antigüedad: 16 años, 1 mes
Puntos: 0
Respuesta: mysql_fetch_array y mysql_free_result

todo el codigo:

Código PHP:
<?php
$nom 
$_GET["nom"];
$llinatge1 $_GET["llinatge1"];
$llinatge2 $_GET["llinatge2"];
if (
$llinatge1 == NULL){
echo 
'<div align="center">No has aplenat un camp necessàri!</div>';
}else{}
?>
<?php
include ('bd.php');
?>
<?php
$result
=mysql_query("select * from actuacions where llinatge1=$llinatge1");
?>
<p>&nbsp;</p>
<table border="0" align="center" >
      <tr>
      <th align="center">Nom</th> 
      <th align="center">1r Llinatge</th>
      <th align="center">2n Llinatge</th>
      <th align="center">Cicle</th>
      <th align="center">Curs</th>
      <th align="center">Grup</th>
<?php
while ($row=mysql_fetch_array($result)){
echo 
'<tr><td>'.$row["nom"].'</td>';
echo 
'<td>'.$row["llinatge1"].'</td>';
echo 
'<td>'.$row["llinatge2"].'</td>';
echo 
'<td>'.$row["cicle"].'</td>';
echo 
'<td>'.$row["curs"].'</td>';
echo 
'<td>'.$row["grup"].'</td></tr>';
}
mysql_free_result($result)
?>
</table>
la conexion esta en el archivo bd.php