[thelist] Personalized "What's New"

.jeff jeff at members.evolt.org
Wed Nov 28 19:32:05 CST 2001


aaron,

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> From: Aaron Cole
>
> I am currently working on a site that will include a
> login feature for posters.  I'd like to create a
> "What's New" area that only displays items they have not
> viewed.
>
> My first thought was to use the visited feature, but
> that is specific to the paticular browser/computer you
> are using.
>
> The only other solution I can think of is to actually
> write the user's id to each item's db row when a user
> views it.  This seems kind of half-assed.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

yeah, yuck.

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> By the way, I'm using CF and Access.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

probably simpler than you might have thought, provided you only care if you
show them what's been posted since they last visited and don't care about
showing them things they haven't read yet.

add a date_lastlogin column to your user table with a datatype of datetime.
each time they login, grab that value, store it in a session variable, and
then update that column in the database to reflect this new login.  each of
the items you want to displays as "what's new" will need to also have a
datetime column that stores the date_created of the item.  now, to show
what's new since their lastlogin simply query the item table for all records
that have a date_created after the user's session.lastlogin.

good luck,

.jeff

http://evolt.org/
jeff at members.evolt.org
http://members.evolt.org/jeff/






More information about the thelist mailing list