ok,. I made the code belo
$count = $MySQL->Query("SELECT COUNT(T1.hits) AS T1count FROM ".$pre."stats_today AS T1 WHERE (year = '".$Year."') AND (month = '".$Month."') AND (date = '".$Day."')");
$total = (int)mysql_result($count, 0, "T1count");
echo $total;
it counts the total rows it seems. And the total is 24 (for each hour) but what I need it to do is count the total hits for each hour together, I need a grand total for the day adding each hour togather.