Hey All,
I have a query, but I'm not sure if it actually says what I want it to say so thought I'd run it past someone here...
I have a table which collects the users IP and the page they visit. I'm trying to find the most popular pages visited by unique users (IP address').
Here's what I have:
$STATSquery = "SELECT *, COUNT(CONCAT(IP, pageID)) as count FROM Stats GROUP BY CONCAT(IP, pageID) ORDER BY count DESC";
I have a feeling it's counting the concat of IP and pageID before it's grouped together... I'd like to group it together and count the groups.
Is my query correct or am I missing something?
Thanks.