grazie ma ora mi da questo messaggio d'errore:
errore: 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 ') AND a_utenti_online_storico.ora >= NOW()' at line 3
$query_grafico="SELECT a_utenti_online_storico.*, COUNT(*) AS 'count', TIME_FORMAT(a_utenti_online_storico.ora, '%H:%i') AS ora2
FROM a_utenti_online_storico
WHERE a_utenti_online_storico.ora < DATE_ADD (NOW(), INTERVAL 1 HOUR) AND a_utenti_online_storico.ora >= NOW()";
$result_grafico = mysql_query($query_grafico, $conn) or die('errore: ' . mysql_error());
$row_grafico1 = mysql_fetch_assoc($result_grafico);
$range_ora1 = $row_grafico1['ora2'];
$countora1 = $row_grafico1['count'];