Hi with the follow code I request what dates are all in my database without duplicates. Then I save it to an array. In the array I also need an other value.
The value I need is how much users are in one day in the database without duplicates. For Example the array must later lookslike 23.07.2013 - 10, 24.07.2013 - 50 (users). I search for several hours but I don't find a good mysql query.
$query = "SELECT id, user, timestamp FROM stat WHERE timestamp BETWEEN '$datum1' AND '$datum2' GROUP BY timestamp";
$result = mysql_query($query,$db);
while($row = mysql_fetch_assoc($result))
{
mysql_num_rows($result);
$dataset1[] = array(strtotime($row['timestamp']),$number_of_users_on_this_day);
}