Hi,
I have a query that should give me the highest number of unique vistors grouped by day and id, but it gives me the wrong result!
any ideas what i'm doing wrong?
Track_time is a timestamp(14)
Track_id is a cookie id to get the unique visitors
$sql7 = mysql_query("SELECT COUNT(track_id) AS cnt FROM tracking WHERE DATE_FORMAT(track_time,'%c') = '$month' AND DATE_FORMAT(track_time,'%Y') = '$year' GROUP BY DATE_FORMAT(track_time,'%e'), track_id ORDER BY cnt DESC LIMIT 1");
Kind regards,
Gerry.
I have a query that should give me the highest number of unique vistors grouped by day and id, but it gives me the wrong result!
any ideas what i'm doing wrong?
Track_time is a timestamp(14)
Track_id is a cookie id to get the unique visitors
$sql7 = mysql_query("SELECT COUNT(track_id) AS cnt FROM tracking WHERE DATE_FORMAT(track_time,'%c') = '$month' AND DATE_FORMAT(track_time,'%Y') = '$year' GROUP BY DATE_FORMAT(track_time,'%e'), track_id ORDER BY cnt DESC LIMIT 1");
Kind regards,
Gerry.