Counting new posts logically (confused myself)
Posted: Sat Oct 23, 2004 2:35 pm
Ok so basically when a user posts a new reply or views a thread then there last visit time is updated. However if I go on a diffrent browser then I still get the count of new posts - even if they are my own.
The query as it is;
Ok so I ran this through phpmyadmin and it showed that the query was counting the posts in threads I was the last poster in - BUT all it wasnt doing was counting my own when really it should look and go `hey, your the last poster (AND p.uid != ".$user_properties['uid'].") and we dont count in that thread.
So Im confused how to incorporate that and the more I think about it the more I confuse myself, help
The query as it is;
Code: Select all
SELECT *
FROM $forumzDB.forumz_posts p
JOIN $forumzDB.forumz_threads t ON (p.tid = t.tid)
JOIN $forumzDB.forumz_forums f ON (t.fid = f.fid)
WHERE p.time > ".$_COOKIEї'last_visit']."
AND f.level <= ".$user_propertiesї'status_id']."
AND f.type != 'lock'
AND p.uid != ".$user_propertiesї'uid']."
ORDER BY p.time ASCSo Im confused how to incorporate that and the more I think about it the more I confuse myself, help