codice:
<?
$qry = ""
. "SELECT "
. "id, titolodocumenti, estesodocumenti "
. "FROM "
. "documenti "
. "ORDER BY "
. "datains DESC"
. ";";
$res = mysql_query($qry);
echo "<table border=\"0\" class=\"descrizione\">\n";
/*
* $res NON è un array! E' l'identificatore della risorsa!
* Inoltre l'elemento ad indice 1 di cui parlavi prima
* non c'è più in quanto prima utilizzavi la funzione paging
* che appunto ti restituiva un array.
*/
if (mysql_num_rows($res)) {
$dati = mysql_fetch_array($res);
echo "<tr><td>{$dati['titolodocumenti']}</td></tr>\n";
echo "<tr><td>{$dati['estesodocumenti']}</td></tr>\n";
} else {
echo "<tr><td>Non ci sono news</td></tr>\n";
}
echo "</table>";
?>