Page 1 of 1
comment counter is incorrect
Posted: Sat Feb 23, 2008 2:59 am
by chiriqui
I caused this by having to flush a bunch of spam comments out of the database. I use phpMYAdmin to empty the comments record
I note that the comments "counter" did not go back to zero on entries that had comments.
Is there a way to zero the counter
thank you
Re: comment counter is incorrect
Posted: Sat Feb 23, 2008 11:10 am
by garvinhicking
Hi!
When you use phpmyadmin you must fix the comment count manually as well, or by using a query like this if you have MySQL 4.1+:
Code: Select all
UPDATE serendipity_entries AS e SET e.comments = (SELECT count(c.entry_id) FROM serendipity_comments AS c WHERE c.entry_id = e.id AND c.status = 'approved')
Regards,
Garvin
Posted: Sun Feb 24, 2008 3:07 pm
by chiriqui
It's proving a little over my head trying to run the script you provided me in phpMyAdmin.
I'm a little reluctant to flush the "entries" field like I did with the "comment", because it appears it's connected to more than just the comment field.
I guess my problem is I don't know where in phpMyAdmin to run the script.
I think I'll just leave it as is. It's not a big issue.
thanks for your support
Posted: Mon Feb 25, 2008 11:21 am
by garvinhicking
Hi!
In phpmyadmin you just need to open the tab "SQL" to enter that SQL query. Make sure your database table preifx is "serendipity_", or else you need to change the table names in the SQL query.
Best regards,
Garvin