Thank you r937!
In the meantime I managed to solve the issue with this mysql query :
Code:
SELECT DISTINCT (visitor_username), ip_address, timestamp
FROM profile_hits
WHERE profile_id = '$user_ID'
GROUP BY visitor_username
ORDER BY id DESC
and then later in the loop looked again at the same table to see the total number of visits to the desired page :
PHP Code:
while ($hits_rows = mysql_fetch_array($q_hits)) {
$visitor = $hits_rows['visitor_username'];
$ip_address = $hits_rows['ip_address'];
$q_all_hits = mysql_query("SELECT timestamp FROM profile_hits WHERE profile_id = '$user_ID' AND visitor_username = '$visitor' ORDER BY timestamp DESC");
$nr_of_visits = mysql_num_rows($q_all_hits);
$row_all_visits = mysql_fetch_assoc($q_all_hits);
This works fine, however I'm a bit afraid that it will generate a large amount of queries when the table gets bigger... Thoughts?
THNX
Bookmarks