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
comment counter is incorrect
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: comment counter is incorrect
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+:
Regards,
Garvin
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')
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
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
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
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
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
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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/