I been trying to fix this graph for some time already. Can anybody tell me what is wrong with the code or the query?
$graphTimeOne = time();
for($graphTimeOne = 29; $graphTimeOne >= 0; $graphTimeOne--){
$graphTimestampOne = mktime(0, 0, 0, date("n"), date("j") - $graphTimeOne, date("Y"));
$graphOneResult = mysql_query("SELECT COUNT(id) FROM id WHERE timestamp >= UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 29 DAY)) GROUP BY DAY(FROM_UNIXTIME(timestamp))");
$User = mysql_result($graphOneResult, 0, 0);
mysql_free_result($graphOneResult);
$graphBarOne[$bar_nr] = $User; // Im Array Speichern
$bar_title[$bar_nr] = date("Y-m-d", $graphTimestampOne);
Why is my code not working with mysql query?