I have a problem to extract values from Mysql
Taking this mysql table ...
Table name: access
id ip country first_access
1 80.14.97.53 fr 2004-07-27 08:26:38
2 62.34.171.112 fr 2004-07-27 08:30:50
3 213.5.67.240 gr 2004-07-27 08:30:55
4 10.140.209.115 us 2004-07-28 08:31:42
5 217.126.113.147 es 2004-07-28 08:33:24
6 24.157.36.155 ca 2004-07-28 08:35:12
7 218.186.147.156 sg 2004-07-29 08:36:45
8 219.110.41.1 jp 2004-07-29 08:37:19
9 65.54.164.135 us 2004-07-29 08:37:50
10 67.15.35.8 us 2004-07-30 08:43:38
11 195.34.228.140 ru 2004-07-30 08:44:31
12 217.82.81.59 de 2004-07-30 08:55:16
... and with this PHP code ...
$access_avg_per_day = @mysql_query("select first_access from `access` group by date_format(first_access, '%Y-%m-%d') asc");
while ($ctime = @mysql_fetch_array($access_avg_per_day)) {
$time_data[] = $ctime['first_access'];
}
echo print_r($time_data);
... I just get an array like that ...
Array ( [0] => 2004-07-27 08:26:38 [1] => 2004-07-28 08:31:42 [2] => 2004-07-29 08:36:45 [3] => 2004-07-30 08:43:38 )
Namely the first timestamp of everyday.
... BUT I would like to extract the set of timestamps per day and not the first timestamp only.
This case could summarized as ... "to extract dates and times stamps per day ... grouped just by date"
Any help is really welcome. Thank you in advance.
Mapg