Trouble setting an incremental message ID - help !
| From: | Sandeep Hundal | Date: | Sat, 18 Nov 2000 16:41:37 +0000 |
| Subject: | Trouble setting an incremental message ID - help ! | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-26062@lists.php.net to get a copy of this message | ||
Hi all,
I'm not talking about the generic row Id here. I have that unique and
primary Id.
I'm making a news orientated site, and would like people to reply to
each news or article. All the comments on all articles are stored in
the same table, but what i would like is to have "Message ID" number
starting from 1 for everytime a new article is posted.
Here's how the table should look
id | time | articleID | name | comments | commentID
----------------------------------------------------------
1 (epoch) 1 foo1 long comment 1
2 (epoch) 1 foo2 long comment 2
3 (epoch) 1 foo3 long comment 3
4 (epoch) 2 foo1 long comment 1
5 (epoch) 2 foo2 long comment 2
I hope you understood that. Its the last comment ID I don't know how
to generate. I need it starting from 1 everytime there's a new
article. In addition, people might reply to Article 2 first, and then
to article 1, and i hope that doesn't mess up things.
Any help would be GREATLY appreciated!!
Thanks!!
/sunny
__________________________________________________
Do You Yahoo!?
Yahoo! Calendar - Get organized for the holidays!
http://calendar.yahoo.com/