ho aggiunto la limitazione di 10 record per pagina e questo funziona, poi però ho aggiunto i link avanti e indietro ma mi da errore. In grassetto le aggiunte:


<?
for ($i=65;$i<91;$i++)
{
echo"<a href=\"inserimento_serviziounghie_new.php?lettera= ".chr($i)."\">".chr($i)."</a>"." ";
}
$lettera = $_GET['lettera'];


if (!isset($start) OR $start<0)
$start=0;
$step = 10;


$query = "SELECT b_serviziounghie.*, b_centri.*, COUNT(b_serviziounghie.*) AS tot, DATE_FORMAT(b_serviziounghie.data_ins_dati, '%d-%m-%Y')AS data_ins_dati
FROM b_serviziounghie, b_centri
WHERE b_serviziounghie.id_centri = b_centri.id_centri AND b_centri.nome_centro LIKE '$lettera%'
ORDER BY b_serviziounghie.data_ins_dati DESC, b_serviziounghie.ora_ins_dati DESC limit $start, $step";
$ris_query=mysql_query($query, $conn);
$pages = intval(($row[tot]-1) / $step)+1;
while($row=mysql_fetch_array($ris_query)){?>

<?
if ($start>0){
$start_back = $start - $step;
echo "<a href=\"".$PHP_SELF."?start=$start_back#fondo\" class=\"tre\">indietro</a>";
}?>


<?
if ($start + $step < $row[tot]){
$start_next = $start + $step;
echo "<a href=\"".$PHP_SELF."?start=$start_next#fondo\" class=\"tre\">avanti</a>";
}?>
questo è l'errore che mi da:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '*) AS tot, DATE_FORMAT(b_serviziounghie.data_ins_dati, '%d-%m-%Y')AS data_ins_da' at line 1