I'd probably go with what Ade suggested. Keep a lookup table with userid and messageid columns.
Only add a message to the lookup table when an user has read it. When you retrieve messages do an outer join on the lookup table and you should get Nulls for all the messages they haven't read. That way you can easily flag the status in the user interface as you loop over the messages for display. Same thing goes for the articles. Spike -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Justin Sent: 26 January 2004 09:43 To: Cfuk Subject: [ cf-dev ] Efficient implementation of Read/Unread messages/articles etc. Hi, I'm looking to do an efficient method of adding a read/unread icon to messages/articles etc. There are potentially 10000s of users and 10000s of messages, so the data can get pretty big fast. I'll probably end up with cheating e.g. only hold the data for messages in the last 2 weeks or something along those lines, but thought I'd ask in case someone has come up with a great solution I hadn't thought of. Cheers, Justin. -- ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] For human help, e-mail: [EMAIL PROTECTED] -- ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] For human help, e-mail: [EMAIL PROTECTED]
