Arg vero però da ancora errore di sintassi su questa variabile
Codice PHP:
$sql="select * from maestri where sesso='uomo'";
Questo è il codice completo:
Codice PHP:
<?php
include "config.php";
connettiDb();
$sql="select * from maestri where sesso='uomo'";
$dati=mysql_query($sql);
$rows=mysql_fetch_array($dati);
foreach ($rows as $row) {
$query = "SELECT SUM(lezioni.lez) AS totLez tot FROM lezioni WHERE id_ins = " . $row['id'] . " AND sesso = 1";
echo ' <td style="vertical-align: top;">' . trim($row['nome'] . ' ' . $row['cognome']) . '
</td>
<td style="vertical-align: top;">' . trim($row['scuola'] ) . '
</td>
<td style="vertical-align: top;">DA INSERIRE
';
}
?>