Is it possible to run this code 24 times in order to find per hour value without copy and pasting the code 24 times.
<?php
$result = mysql_query('SELECT date,SUM(value) AS value_sum FROM me Where WEEKDAY(date) >="6" AND HOUR(date)="0" ');
$row = mysql_fetch_assoc($result);
$h0= $row['value_sum'];
?>
<?php
$result = mysql_query('SELECT date,SUM(value) AS value_sum FROM me Where WEEKDAY(date) >="6" AND HOUR(date)="1" ');
$row = mysql_fetch_assoc($result);
$h1= $row['value_sum'];
?>