Re: get a total comment listing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"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" <james@xxxxxxxxxxxxx> 
08/01/2004 09:13

To
<php-db@xxxxxxxxxxxxx>
cc

Subject
 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.
***********************************************************************


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux