Steve Finkelstein wrote:
Hi all,

I'm contemplating on a proper way of handling a counter for profile
views on my auto dealership website. I'm currently confused with the
type of algorithm to approach this with.

Say a user has a registered session, and views profile a). I can
increment the counter for that vehicle. The user can then surf
vehicles b,c,d....N etc and I'll increment the counter. However, if
the same session tries to visit profile a,b,c,d should I not increment
the counter? How would you all do it?

Depends on what stats you want to see. If you want to see info per-session then ignore duplicates. If you want to see info for everything, don't ignore duplicates.

Alternatively store everything - duplicates and uniques and depending what you want to see you have both.

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to