Codice PHP:$query = mysql_query ('SELECT * FROM `appuntamenti` WHERE `Agente` = ""'); $numero = mysql_num_rows($query); $numero2 = $numero; if ($numero2 == 1) { echo "C'è $numero2 appuntamento da assegnare"; } elseif ($numero2 > 1) { echo "Ci sono $numero2 appuntamenti da assegnare"; } else { echo "Non ci sono appuntamenti da assegnare"; } ?> <table width="1000" class="graficatabella"> <tr> <td>ID</td> <td>Ragione Sociale</td> <td>Referente</td> <td>Data Appuntamento</td> <td>Agente</td> <td>Operatore</td> <td>Campagna</td> <td>Data Telefonata</td> <td>Note</td> <td>Indirizzo</td> <td>Città</td> <td>Provincia</td> <td>Telefono</td> <td>Esiti</td> <td>Note</td> <td>Storni</td> <td>Note</td> <td>Verifica</td> <td>Inviato</td> </tr> <?php echo "e sono:
"; while($ricerca2 = mysql_fetch_array($query)){ $ID = htmlentities($ricerca2['ID']); $ragionesociale = htmlentities($ricerca2['Ragione Sociale']); $referente = htmlentities($ricerca2['Referente']); $dataappuntamento = htmlentities($ricerca2['Data Appuntamento']); $agente = htmlentities($ricerca2['Agente']); $operatore = htmlentities($ricerca2['Operatore']); $campagna = htmlentities($ricerca2['Campagna']); $datatelefonata = htmlentities($ricerca2['Data Telefonata']); $note = htmlentities($ricerca2['Note']); $indirizzo = htmlentities($ricerca2['Indirizzo']); $città = htmlentities($ricerca2['Città']); $provincia = htmlentities($ricerca2['Provincia']); $telefono = htmlentities($ricerca2['Telefono']); $esiti = htmlentities($ricerca2['Esiti']); $note1 = htmlentities($ricerca2['Note1']); $storni = htmlentities($ricerca2['Storni']); $note2 = htmlentities($ricerca2['Note2']); $verifica = htmlentities($ricerca2['Verifica']); $inviato = htmlentities($ricerca2['Inviato']); ?> <tr> <td><?php echo $ID ?></td> <td><?php echo $ragionesociale ?></td> <td><?php echo $referente ?></td> <td><?php echo $dataappuntamento ?></td> <td><?php echo $agente ?></td> <td><?php echo $operatore ?></td> <td><?php echo $campagna ?></td> <td><?php echo $datatelefonata ?></td> <td><?php echo $note ?></td> <td><?php echo $indirizzo ?></td> <td><?php echo $città ?></td> <td><?php echo $provincia ?></td> <td><?php echo $telefono ?></td> <td><?php echo $esiti ?></td> <td><?php echo $note1 ?></td> <td><?php echo $storni ?></td> <td><?php echo $note2 ?></td> <td><?php echo $verifica ?></td> <td><?php echo $inviato ?></td> </tr> <?php } ?> </table>

Rispondi quotando