tengo este codigo para consulta:
   Código PHP:
    <?php
session_start ();
if (!isset($_SESSION['autentificado']) || $_SESSION['autentificado'] != 'SI'){
    header ("Location: formulario.php");
    exit;
}
 
include ("config.php");
 
 
$sql="SELECT materia,nota FROM estudiantes INNER JOIN (notas INNER JOIN materias ON notas.materia = materias.materia) ON estudiantes.cedula = notas.cedula WHERE estudiantes.cedula='".$_POST['cedula']."'"; 
 
$res=mysql_query($sql) or die (mysql_error());
 
 
while($row=mysql_fetch_array($res)) 
 
{
 
 
echo "".$row[materia]."<br><br>";
 
echo "".$row[nota]."<br><br>";
 
 
}
?>
 
Click <a href="logout.php">aquí</a> para salir del sistema.   
  Lo que me muestra como respuesta es: 
Column: 'materia' in field list is ambiguous 
donde esta el error?