SELECT
LinkURL, LinkDescription, LinkText,
(
SELECT COUNT(*) FROM Comments
WHERE
Parent = Review.ReviewID
AND CommentDate >= '$last_vist'
) AS RecentCommentCount
FROM Review
additional where clauses here
It's a session variable and it's supposed to work like so:
You hit mefi for the first time since yesterday. A script checks the timestamp on yesterday and stores that as a session variable. Then it grabs the current time (now) and puts that into the database, replacing your timestamp of yesterday. All queries work off the session variable.
Now, in order for that session variable to die, and for your next visit to reference your previous visit today, you need to stay away from loading any www.metafilter.com page for 20 minutes. If you check the site more often than that, it will never be updated, and continue to use yesterday's date.
These should all be keyed off the database, and not a cookie, so I don't know why you are getting different counts on different computers, other than it is taking more than 20 minutes to move from one computer to the next.
posted by odinsdream at 2:27 PM on March 28, 2005