View Single Post
Old 08-04-2004, 02:53 PM   #1 (permalink)
FaderMonkey
Psycho
 
FaderMonkey's Avatar
 
Location: Orlando, FL
[MySQL] number of weblog comments

So, I've created a weblog with PHP and MySQL. I've set it up so that people can comment on each weblog entry. Now, like most weblogs, I want the comment link under each weblog entry to show how many comments have been posted so far. Any ideas on how to best do that? As I've set it up now, whenever I post a blog entry my site creates a new table in MySQL for the comments for that entry. Is there a way of reading the number of rows in that table? I was also thinking of having a INT column in the table and setting it to AUTO_INCREMENT, but then how to I read the value of the last entry in that column?
FaderMonkey is offline  
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43