[PHP-DB] get a total comment listing

2004-01-08 Thread js
im making a website where visitors can comment on essays that they read. i have a 
table that contains every comment written and each comment has its own ID for primary 
key and articleid column for which essay it is written for. now, i want to be able to 
tally up how many comments there are for each particular article on  a page that sums 
up all of the essays for a user, so that you can tell which ones have had new comments 
and which havent. its quite basic, but im stuck as far as what to do. any help would 
be great, thanks.
-james

Re: [PHP-DB] get a total comment listing

2004-01-08 Thread Tristan . Pretty
i want to be able to tally up how many comments there are for each 
particular article on  a page
SELECT COUNT(row_name) from your_table

so that you can tell which ones have had new comments and which havent
$today = date(Y-d-m);
SELECT COUNT(row_name) from your_table WHERE date = '$today'

Jsut a few rambling thoughts...
Did you want each user to see what was unread JUST by them, or just those 
comments in teh past week etc?





js [EMAIL PROTECTED] 
08/01/2004 09:13

To
[EMAIL PROTECTED]
cc

Subject
[PHP-DB] get a total comment listing






im making a website where visitors can comment on essays that they read. i 
have a table that contains every comment written and each comment has its 
own ID for primary key and articleid column for which essay it is written 
for. now, i want to be able to tally up how many comments there are for 
each particular article on  a page that sums up all of the essays for a 
user, so that you can tell which ones have had new comments and which 
havent. its quite basic, but im stuck as far as what to do. any help would 
be great, thanks.
-james


*
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***