RE: [PHP] Can PHP do this?
| From: | Cal Evans | Date: | Tue, 09 Jan 2001 03:38:52 +0000 |
| Subject: | RE: [PHP] Can PHP do this? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-33372@lists.php.net to get a copy of this message | ||
Ed,
If all messages are posted in a table, messages of the structure:
message
========
messageID bigint auto_number not null
---------
message text
postedByID bigint
forumID
----------------------
and each member, upon joining is given a record in a table of the structure:
member
======
memberID bigint auto_number not null
--------
name
emailAddress
lastMessageRead bigint
Then each time a user reads a message, you update his record by storing that
message number in lastMessageRead.
You can tell if a forum has unread messages if it contains a message number
higher than the last message read by this user.
You can count how many messages exist in the system higher than the last
message read by this user and tell them how many un-read messages there are
in the system. (optionally, you can group this by forum and tell them how
many un-read in each forum.)
It can get a lot more complex than this if you want it to but this is the
basic premise...and yes, PHP can do this but it's really more dependant on
your database.
Cal
http://www.calevans.com
-----Original Message-----
From: Ed Lazor [mailto:osmosis@atfantasy.com]
Sent: Monday, January 08, 2001 9:30 PM
To: php-general@lists.php.net
Subject: [PHP] Can PHP do this?
I love the message board they have at
http://www.GamingOutpost.com/forums. I'm
trying to figure out how they
track which messages you've read and which forums have unread
messages. Someone just told me it's something to do with them using Cold
Fusion. Is this true? Is there a way to do it in PHP?
-Ed
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net