Salve ragazzi volevo esporvi il mio problema:
ho creato 2 dabelle in un db mysql
la prima è file_doc
id_doc int 11 not_null autoincrement primary key
file varchar 250
data varchar 10
com text
la seconda e' docenti
id_doc int 11 not_null autoincrement primary key
nome varchar 250
cognome varchar 250
docente varchar 250
il mio grande problema è che quando vado a richiamare la query in questo modo:
[PHP]
$query="SELECT docenti.nome, docenti.cognome , file_doc.data, file_doc.com, file_doc.file FROM docenti, file_doc WHERE docenti.id_doc = file_doc.id_doc;";
$select=mysql_query($query,$conn)
or die($query);
while($records=mysql_fetch_array($select)){
?>
</td>
</tr>
</table>
<table width="500" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><?php echo $records["nome"];?></td>
</tr>
<tr>
<td><?php echo $records["cognome"];?></td>
</tr>
<tr>
<td><?php echo $records["data"];?></td>
</tr>
<tr>
<td><?php echo $records["com"];?></td>
</tr>
<tr>
<td><?php echo $records["file"];?></td>
</tr>
<tr>
<td>
<?php
}
mysql_free_result($select);
?>
all'output mi restitutisce tutti gli utenti ed i relativi dati a loro associati come se la clusola where fosse inutile
vi ringrazio anticipatamente