Hi
I've been trying to find some straight-forward guidance on collecting and sorting like results from a database query.
I'm writing a user logging script and need to extract similar results eg:
id|ip..........|cookie|timein|timeout
1 |204.55.44.20| 34 ..|09:30 |09:55
2 |132:55:85:39| 35 ..|09:43 |09:47
3 |133:57:32:32| 36 ..|09:40 |09:59
4 |204.55.44.20| 35 ..|09:59 |10:23
In other words, if I wanted the number of users I would normally simply count the number of results, however I need to gather all similar IP addresses and count each set as 1 user.
I also need to do this with URL arrays, where I need to count all identical URLs so I can give a total hits count for each page.
I know I can do this all with LOADS of SQL statements but is there any way to sort the results after "SELECT * FROM dbname"?
Cheers 🙂