ecco un semplice script per recuperare i dati dalla tabella:
Codice PHP:<?php
$count1 = 0;
$res1 = mysql_query( "SELECT * FROM [NOME_TABELLA] ORDER BY [CAMPO ORDINAMENTO];");
$number=mysql_num_rows($res1);
if ($number == 0)
{
print("Al momento non sono presenti elementi.");
}
else{
print("<table>
<thead>
<tr>
<th class='cella_intestazione'>Squdra</th>
<th class='cella_intestazione'>Punti</th>
</tr>
</thead>
<tbody>");
while ( $riga1 = mysql_fetch_array( $res1 ) ) {
print("<tr>");
print("<td class='cella_corpo_2'>".$riga1["CAMPO DELLA SQUADRA"]."</td>");
print("<td class='cella_corpo'>".$riga1["CAMPO DEI PUNTI"]."</td>");
print("</tr>");
}
}
?>

Rispondi quotando